mirror of https://github.com/icedland/iced.git
Test updates
This commit is contained in:
parent
5df6c65077
commit
b97ff1c504
|
@ -276,7 +276,7 @@ jobs:
|
|||
wasm-pack build --mode force --target nodejs
|
||||
cd src/tests
|
||||
npm install
|
||||
npm run test
|
||||
npm test
|
||||
|
||||
cd ..
|
||||
git clean -xdf
|
||||
|
|
|
@ -56,7 +56,7 @@ cd src/rust/iced-x86-js
|
|||
wasm-pack build --mode force --target nodejs
|
||||
cd src/tests
|
||||
npm install
|
||||
npm run test
|
||||
npm test
|
||||
```
|
||||
|
||||
## Feature flags
|
||||
|
|
|
@ -216,7 +216,7 @@ test("Decode with DecoderOptions.AmdBranches", () => {
|
|||
});
|
||||
|
||||
test("Creating a Decoder with an invalid bitness throws", () => {
|
||||
expect(() => new Decoder(63, new Uint8Array([0x90], DecoderOptions.None))).toThrow();
|
||||
expect(() => new Decoder(63, new Uint8Array([0x90]), DecoderOptions.None)).toThrow();
|
||||
});
|
||||
|
||||
// Make sure it's not an enum arg in the Rust code since it's a flags enum. It must be a u32 in the method sig.
|
||||
|
|
|
@ -268,6 +268,7 @@ test("Format instruction: gas", () => {
|
|||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic)).toBe("");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoPrefixes)).toBe("vcvtne2ps2bf16");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic | FormatMnemonicOptions.NoPrefixes)).toBe("");
|
||||
expect(formatter.formatMnemonic(instr2)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.None)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoMnemonic)).toBe("lock");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoPrefixes)).toBe("add");
|
||||
|
@ -314,6 +315,7 @@ test("Format instruction: Intel", () => {
|
|||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic)).toBe("");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoPrefixes)).toBe("vcvtne2ps2bf16");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic | FormatMnemonicOptions.NoPrefixes)).toBe("");
|
||||
expect(formatter.formatMnemonic(instr2)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.None)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoMnemonic)).toBe("lock");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoPrefixes)).toBe("add");
|
||||
|
@ -360,6 +362,7 @@ test("Format instruction: masm", () => {
|
|||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic)).toBe("");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoPrefixes)).toBe("vcvtne2ps2bf16");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic | FormatMnemonicOptions.NoPrefixes)).toBe("");
|
||||
expect(formatter.formatMnemonic(instr2)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.None)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoMnemonic)).toBe("lock");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoPrefixes)).toBe("add");
|
||||
|
@ -406,6 +409,7 @@ test("Format instruction: nasm", () => {
|
|||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic)).toBe("");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoPrefixes)).toBe("vcvtne2ps2bf16");
|
||||
expect(formatter.formatMnemonicOptions(instr, FormatMnemonicOptions.NoMnemonic | FormatMnemonicOptions.NoPrefixes)).toBe("");
|
||||
expect(formatter.formatMnemonic(instr2)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.None)).toBe("lock add");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoMnemonic)).toBe("lock");
|
||||
expect(formatter.formatMnemonicOptions(instr2, FormatMnemonicOptions.NoPrefixes)).toBe("add");
|
||||
|
|
|
@ -123,6 +123,7 @@ test("Instruction props", () => {
|
|||
expect(instr.conditionCode).toBe(ConditionCode.None);
|
||||
|
||||
const instr2 = instr.clone();
|
||||
expect(instr).not.toBe(instr2);
|
||||
expect(instr.equalsAllBits(instr2)).toBe(true);
|
||||
expect(instr.equals(instr2)).toBe(true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue