more dubious test hacking

This commit is contained in:
Torsten Ruger 2015-11-02 17:32:06 +02:00
parent 0094a89707
commit 23e09b7149
2 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@ HERE
def test_class_field_value def test_class_field_value
@string_input = <<HERE @string_input = <<HERE
class Object class Object
field int boo = 1 field int boo1 = 1
int main() int main()
return 1 return 1
end end
@ -55,9 +55,9 @@ HERE
def test_class_field def test_class_field
@string_input = <<HERE @string_input = <<HERE
class Object class Object
field int boo field int boo2
int main() int main()
return self.boo return self.boo2
end end
end end
HERE HERE

View File

@ -8,7 +8,8 @@ class TestObject < MiniTest::Test
def test_object_create def test_object_create
# another test sometime adds a field variable. Maybe should reboot ? # another test sometime adds a field variable. Maybe should reboot ?
res = @object.get_layout.variable_index(:runner) ? 2 : 1 res = 1
[:boo1 , :boo2 , :runner].each { |v| res += 1 if @object.get_layout.variable_index(v) }
assert_equal res , @object.get_layout.instance_length , @object.get_layout.inspect assert_equal res , @object.get_layout.instance_length , @object.get_layout.inspect
end end