cclang/doc/target/test.bl

35 lines
877 B
Plaintext
Raw Normal View History

lib Tests
{
/*
declaration of some tests
*/
2020-05-25 16:36:44 +02:00
public class test1
{
2020-05-25 16:36:44 +02:00
public var test_string: string = 'Hello';
public var test_string_2: string = "Hello World";
public var test_num: num = 1;
public var test_num_2: num = 1.0;
public var test_num_3: num = this.test_num + this.test_num_2;
2020-05-25 16:36:44 +02:00
public func dec_vars(): void
{
2020-05-25 16:36:44 +02:00
var test_bool: bool = true;
var test_bool_2: bool = false;
var test_bool_3: bool = test_bool != test_bool_2; # true
}
2020-05-25 16:36:44 +02:00
public is_error(): bool
{
if (error != empty)
{
output(error.code + ' ' + error.message);
2020-05-25 22:04:56 +02:00
return true;
}
else
{
output('continue');
2020-05-25 22:04:56 +02:00
return false;
}
}
}
}