GetVariableType() public method

public GetVariableType ( string name ) : IType
name string
return IType
Beispiel #1
0
 public void DefineVariable()
 {
     IClass type = new BaseClass("int", null);
     IClass klass = new BaseClass("MyClass", null);
     klass.DefineVariable("age", type);
     var result = klass.GetVariableType("age");
     Assert.IsNotNull(result);
     Assert.AreEqual(type, result);
 }
Beispiel #2
0
 public void DefineVariableAndGetVariableFromSuper()
 {
     IClass type = new BaseClass("int", null);
     IClass super = new BaseClass("MySuperclass", null);
     IClass klass = new BaseClass("MyClass", super);
     super.DefineVariable("age", type);
     var result = klass.GetVariableType("age");
     Assert.IsNotNull(result);
     Assert.AreEqual(type, result);
 }
Beispiel #3
0
 public void UnknowVariableAsNullType()
 {
     IClass klass = new BaseClass("Object", null);
     Assert.IsNull(klass.GetVariableType("a"));
 }