forked from cleolibrary/CLEO4
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added load_fxt and unload_fxt opcodes (#170)
- Loading branch information
Showing
7 changed files
with
201 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{$CLEO .s} | ||
{$INCLUDE_ONCE ../cleo_tester.inc} | ||
|
||
script_name '2606' | ||
test("2606 (load_fxt)", tests) | ||
terminate_this_custom_script | ||
|
||
function tests | ||
it("GXTs should not exists yet", test1) | ||
it("should load new GXTs", test2) | ||
return | ||
|
||
function test1 | ||
int ptr | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T1' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T2' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T3' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
end | ||
|
||
function test2 | ||
2606: load_fxt {filepath} "cleo\cleo_tests\text\non existing file.fxt" | ||
assert_result_false() | ||
|
||
2606: load_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
assert_result_true() | ||
|
||
int ptr | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T1' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test one") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T2' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test two") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T3' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test three") | ||
|
||
// load again | ||
2606: load_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
assert_result_true() | ||
|
||
unload_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{$CLEO .s} | ||
{$INCLUDE_ONCE ../cleo_tester.inc} | ||
|
||
script_name '2607' | ||
test("2607 (unload_fxt)", tests) | ||
terminate_this_custom_script | ||
|
||
function tests | ||
it("GXTs should not exists yet", test1) | ||
it("should load new GXTs", test2) | ||
it("should unload GXTs", test3) | ||
return | ||
|
||
function test1 | ||
int ptr | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T1' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T2' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T3' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
end | ||
|
||
function test2 | ||
load_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
assert_result_true() | ||
|
||
int ptr | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T1' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test one") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T2' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test two") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T3' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "Test three") | ||
|
||
// load again | ||
load_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
assert_result_true() | ||
end | ||
|
||
function test3 | ||
2607: unload_fxt {filepath} "cleo\cleo_tests\text\non existing file.fxt" | ||
assert_result_false() | ||
|
||
2607: unload_fxt {filepath} "cleo\cleo_tests\text\test.fxt" | ||
assert_result_true() | ||
|
||
int ptr | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T1' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T2' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
|
||
ptr = get_text_label_string {key} 'CLEO_T3' | ||
assert_ptr(ptr) | ||
assert_eqs(ptr, "") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CLEO_T1 Test one | ||
CLEO_T2 Test two | ||
CLEO_T3 Test three |