/
ProgramMode.t
74 lines (62 loc) · 2.12 KB
/
ProgramMode.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Automatically generated test for Class Rosella.CommandLine.ProgramMode
class Test_Rosella_CommandLine_ProgramMode
{
function test_new()
{
var obj = new Rosella.CommandLine.ProgramMode("");
self.assert.not_null(obj);
self.assert.instance_of(obj, class Rosella.CommandLine.ProgramMode);
}
function set_function()
{
self.status.verify("Test Rosella.CommandLine.ProgramMode.set_function()");
var obj = new Rosella.CommandLine.ProgramMode("");
var arg_0 = function(var args) { };
var result = obj.set_function(arg_0);
}
function set_usage()
{
// TODO: This is very fragile, I don't like matching exact strings, especially
// when there's whitespace involved.
var obj = new Rosella.CommandLine.ProgramMode("foo");
obj.set_usage("This is a test");
string usage = obj.get_usage("foo");
self.assert.str_equal(usage, " foo This is a test\n");
}
function get_usage()
{
self.status.unimplemented("Need to set up some conditions to test with");
}
function can_accept()
{
self.status.verify("Test Rosella.CommandLine.ProgramMode.can_accept()");
var obj = new Rosella.CommandLine.ProgramMode("");
var arg_0 = null;
var result = obj.can_accept(arg_0);
}
function main_function()
{
self.status.verify("Test Rosella.CommandLine.ProgramMode.main_function()");
var obj = new Rosella.CommandLine.ProgramMode("");
var result = obj.main_function();
}
function require_flag()
{
self.status.unimplemented("This");
}
function require_value()
{
self.status.unimplemented("This");
}
function require_condition()
{
self.status.unimplemented("This");
}
}
function main[main]()
{
var core = load_packfile("rosella/core.pbc");
using Rosella.initialize_rosella; initialize_rosella("test");
using Rosella.load_bytecode_file; load_bytecode_file("rosella/commandline.pbc", "load");
using Rosella.Test.test; test(class Test_Rosella_CommandLine_ProgramMode);
}