eolian: fix wrong enum tests

This commit is contained in:
Daniel Kolesa 2015-05-12 14:37:16 +01:00
parent 5f32c178e9
commit 6e7ab244f7
2 changed files with 4 additions and 5 deletions

View File

@ -9,13 +9,13 @@ enum Bar {
foo = enum Foo.baz
}
type Baz: enum _Baz {
enum Baz {
flag1 = 1 << 0,
flag2 = 1 << 1,
flag3 = 1 << 2
};
}
const Bah: int = Baz.flag1;
const Bah: int = enum Baz.flag1;
class Enum {
methods {

View File

@ -886,8 +886,7 @@ START_TEST(eolian_enum)
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 15);
fail_if(!(type = eolian_type_alias_get_by_name("Baz")));
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!(type = eolian_type_enum_get_by_name("Baz")));
fail_if(!(field = eolian_type_enum_field_get(type, "flag1")));
fail_if(!(exp = eolian_type_enum_field_value_get(field)));