15 puts typeof(typeof(a))
18 puts typeof(typeof(true))
24 def __test_reallocate_byte_array # FIXME
35 def test_new_byte_array
36 # note - its not yet a byte array its an array of ints so must allocate * 4!
54 putchar t.get_element(a)
56 putchar t.get_element(a)
61 def test_string_constant
64 t = "this is a string"
65 puts typeof(VByteArray.new)
66 puts typeof(t) # TODO - for the moment the string is a VByteArray we need to wrap it in RString or so!
67 size = t.get_element(0)
68 n = 1 # pos 0 is the length
70 putchar t.get_element(n)
73 }, "5\n5\nthis is a string"
76 def test_instance_variable
79 #{$stdlib_member_vars}
96 def __test_global_variable # FIXME
113 def test_multiple_custom_class_empty_initializer_instance_method_same_method_names
133 def test_custom_class_empty_initializer_instance_methods
150 def test_stdlib_string
156 # fixme - puts is a builtin that currently just prints an int, should be removed
158 puts strlen(concat("foo", "bar"))
159 putstr concat("foo", "bar")
160 }, "blah214214\n6\nfoobar"
163 def __test_method_operator # FIXME
174 def test_static_methods
195 dummy = false # another dummy!!! why??? because we don't assign any variables? :|
201 putchar ?0 + last_digit
221 def my_second_function
224 my_second_function}, "5\n"
226 def my_other_function2 a
229 my_other_function2 800}, "800\n"
231 def my_other_function3 a, b
235 my_other_function3 700, 800}, "700\n808\n"
237 def my_fourth_function a
242 my_fourth_function t}, "800\n800\n"
263 # test out puts of bools
264 dummy = false # FIXME - this is required???
269 # test out equality operators
279 # test out eq on local vars
291 }, "130\n129\n128\n127\n126\n125\n124\n123\n122\n121\n"
308 # test that a src = dest does a copy of dest
318 # setting/puts of local var
323 # setting an addition of constant and constant
328 # puts of addition of constant and constant
332 # test of localvar += constant construct
341 def test_complex_mult_table
345 def mul_line sx, sy, y
346 max_num_len = strlen(num_to_s(sx * sy))
347 alignment = max_num_len + 1
350 num_str = num_to_s(x * y)
351 num_spaces = alignment - strlen(num_str)
370 }, " 1 2 3 4 5 6 7 8 9 10 11 12\n 2 4 6 8 10 12 14 16 18 20 22 24\n 3 6 9 12 15 18 21 24 27 30 33 36\n 4 8 12 16 20 24 28 32 36 40 44 48\n 5 10 15 20 25 30 35 40 45 50 55 60\n 6 12 18 24 30 36 42 48 54 60 66 72\n 7 14 21 28 35 42 49 56 63 70 77 84\n 8 16 24 32 40 48 56 64 72 80 88 96\n 9 18 27 36 45 54 63 72 81 90 99 108\n 10 20 30 40 50 60 70 80 90 100 110 120\n 11 22 33 44 55 66 77 88 99 110 121 132\n 12 24 36 48 60 72 84 96 108 120 132 144\n"
373 def test_many_nested_function_calls