Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (19 sloc) 0.647 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use t::CompileTestLib;
use NativeCall;

say "1..9";

compile_test_lib('02-simple-args');

# Int related
sub TakeInt(int32) is native('02-simple-args') { * }
sub TakeTwoShorts(int16, int16) is native('02-simple-args') { * }
sub AssortedIntArgs(int32, int16, int8) is native('02-simple-args') { * }
TakeInt(42);
TakeTwoShorts(10, 20);
AssortedIntArgs(101, 102, 103);

# Float related
sub TakeADouble(num64) is native('02-simple-args') { * }
sub TakeAFloat(num32) is native('02-simple-args') { * }
TakeADouble(-6.9e0);
TakeAFloat(4.2e0);

# String related
sub TakeAString(Str) is native('02-simple-args') { * }
TakeAString('ok 9 - passed a string');
Something went wrong with that request. Please try again.