Add a ConditionCode test
@@ -514,6 +514,27 @@ namespace Iced.UnitTests.Intel.InstructionInfoTests {
Assert.Equal(cc, instr.ConditionCode);
}
}
+
+ [Fact]
+ void Verify_ConditionCode_values_are_in_correct_order() {
+ Assert.Equal(0, (int)ConditionCode.None);
+ Assert.Equal(1, (int)ConditionCode.o);
+ Assert.Equal(2, (int)ConditionCode.no);
+ Assert.Equal(3, (int)ConditionCode.b);
+ Assert.Equal(4, (int)ConditionCode.ae);
+ Assert.Equal(5, (int)ConditionCode.e);
+ Assert.Equal(6, (int)ConditionCode.ne);
+ Assert.Equal(7, (int)ConditionCode.be);
+ Assert.Equal(8, (int)ConditionCode.a);
+ Assert.Equal(9, (int)ConditionCode.s);
+ Assert.Equal(10, (int)ConditionCode.ns);
+ Assert.Equal(11, (int)ConditionCode.p);
+ Assert.Equal(12, (int)ConditionCode.np);
+ Assert.Equal(13, (int)ConditionCode.l);
+ Assert.Equal(14, (int)ConditionCode.ge);
+ Assert.Equal(15, (int)ConditionCode.le);
+ Assert.Equal(16, (int)ConditionCode.g);
+ }
}
}
#endif
