Fixed up testing etc
This commit is contained in:
27
tests/test_objectOrderingTest.krak
Normal file
27
tests/test_objectOrderingTest.krak
Normal file
@@ -0,0 +1,27 @@
|
||||
import io:*;
|
||||
|
||||
typedef objectA {
|
||||
|int| a;
|
||||
};
|
||||
|
||||
typedef BigObject {
|
||||
|objectA| a;
|
||||
|objectB| b;
|
||||
|int| add() {
|
||||
return a.a + b.b;
|
||||
}
|
||||
};
|
||||
|
||||
typedef objectB {
|
||||
|int| b;
|
||||
};
|
||||
|
||||
|
||||
|int| main() {
|
||||
|BigObject| c;
|
||||
c.a.a = 4;
|
||||
c.b.b = 8;
|
||||
print(c.add());
|
||||
print("\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user