Beispiel #1
0
 public void EnumWithValue()
 {
     StructFile structFile = new StructParser().LoadStructs("enum a { b=5, c=8 }");
     EnumDef enumDef = structFile.GetEnumByName("a");
     Assert.AreEqual("b", enumDef.ValueToString(5));
     Assert.AreEqual("c", enumDef.ValueToString(8));
 }
Beispiel #2
0
        [Test] public void EnumWithValue()
        {
            StructFile structFile = new StructParser().LoadStructs("enum a { b=5, c=8 }");
            EnumDef    enumDef    = structFile.GetEnumByName("a");

            Assert.AreEqual("b", enumDef.ValueToString(5));
            Assert.AreEqual("c", enumDef.ValueToString(8));
        }
Beispiel #3
0
 public void Enum()
 {
     StructFile structFile = new StructParser().LoadStructs("enum a { b, c }");
     EnumDef enumDef = structFile.GetEnumByName("a");
     Assert.IsNotNull(enumDef);
     Assert.AreEqual("b", enumDef.ValueToString(0));
     Assert.AreEqual("c", enumDef.ValueToString(1));
 }
Beispiel #4
0
        [Test] public void Enum()
        {
            StructFile structFile = new StructParser().LoadStructs("enum a { b, c }");
            EnumDef    enumDef    = structFile.GetEnumByName("a");

            Assert.IsNotNull(enumDef);
            Assert.AreEqual("b", enumDef.ValueToString(0));
            Assert.AreEqual("c", enumDef.ValueToString(1));
        }