Files
Sean Garwood bb3a5d26d0 Fix AT&T warning showing for native langs w/ undefined intelAsm (#8576)
Fixes #8567 

Fix bug where `asmSyntax` returned 'att' for compilers that do not
define
`intelAsm` (e.g. Rust, Spice), but that do support Intel:

- The base compiler defaults `supportsIntel` property to
`!!this.compiler.intelAsm`
- Aforementioned compilers override this in [optionsForFilter
override](6b1ff666f2/lib/compilers/rust.ts (L272))

Before:

```typescript
// bug
const isAtt = /*...*/ !(this.filters.isSet('intel') && this.compiler.intelAsm.includes('intel'));
/*                            1                                 0                           */
/*                                                   0                                      */
/*                               !0 => 1                                                    */
```

Removing the check for intelAsm resolves this.

- Extracted the logic that determines the assembly syntax and added unit
tests
  that cover all possible inputs.
- Verified with local Rust.

## Miscellany

- **rm handling of 'last operand'**
- **fix: order-agnostic refCardinalityOfSrcDstOperands**
- Marked TODO: only show warnings where relevant, i.e. if the
cardinality of
src/dst operands is not shown in tooltip text but is shown in context
menu,
then the warning should only display in the context menu. Beyond scope
of
    this PR.
- **optional supportsIntel arg, test undefined supportsIntel**

<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2026-04-14 20:49:30 -05:00
..
2025-06-19 08:46:57 -05:00

Front-end unit tests

Tests here are super simple and use jsdom with a fake document to do quick checks on the front-end code.

For anything requiring a real browser, use the cypress tests in the cypress directory.