mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-02 19:58:07 +03:00
Fix DI command and add tests
This commit is contained in:
+4
-4
@@ -41,13 +41,13 @@ void commandDC() {
|
||||
|
||||
void commandDI() {
|
||||
int page = getCaliValue();
|
||||
int *var_use = getCaliVariable();
|
||||
int *var_size = getCaliVariable();
|
||||
int *var_save = getCaliVariable();
|
||||
|
||||
*var_size = v_releaseArrayVar(page);
|
||||
*var_save = v_getArrayBufferCnt(page) == true ? 1 : 0;
|
||||
*var_use = v_getArrayBufferStatus(page);
|
||||
*var_size = (v_getArrayBufferCnt(page) + 1) & 0xffff;
|
||||
|
||||
DEBUG_COMMAND("DI %d,%p,%p:\n", page, var_size, var_save);
|
||||
DEBUG_COMMAND("DI %d,%p,%p:\n", page, var_use, var_size);
|
||||
}
|
||||
|
||||
void commandDS() {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
The test scenario file (`testSA.ALD`) in this directory should pass in both
|
||||
xsystem35 and the original System 3.x.
|
||||
|
||||
To build `testSA.ALD`, install [xsys35c](https://github.com/kichikuou/xsys35c)
|
||||
and run `xsys35c` command in this directory.
|
||||
@@ -0,0 +1,11 @@
|
||||
!RND:0!
|
||||
!tests_passed:0!
|
||||
!tests_failed:0!
|
||||
ZH 2:
|
||||
|
||||
%#testd.adv:
|
||||
|
||||
HH0,tests_passed: ' tests passed' R
|
||||
HH0,tests_failed: ' tests failed' R
|
||||
{tests_failed: A}
|
||||
ZZ0,0:
|
||||
@@ -0,0 +1,4 @@
|
||||
#SYSTEM35
|
||||
test.adv
|
||||
util.adv
|
||||
testd.adv
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
MS FILE,"testd.adv":
|
||||
!used:0!
|
||||
!size:0!
|
||||
|
||||
DI 1,used,size:
|
||||
~AssertEqual used,0,__LINE__:
|
||||
|
||||
DC 1,10,0:
|
||||
DI 1,used,size:
|
||||
~AssertEqual used,1,__LINE__:
|
||||
~AssertEqual size,11,__LINE__:
|
||||
|
||||
DC 255,65535,0:
|
||||
DI 255,used,size:
|
||||
~AssertEqual used,1,__LINE__:
|
||||
~AssertEqual size,0,__LINE__:
|
||||
|
||||
%0:
|
||||
@@ -0,0 +1,16 @@
|
||||
const word FILE = 1:
|
||||
!actual:0!
|
||||
!expected:0!
|
||||
!line:0!
|
||||
|
||||
**AssertEqual actual,expected,line:
|
||||
{expected = actual:
|
||||
inc tests_passed:
|
||||
%0:
|
||||
}
|
||||
inc tests_failed:
|
||||
'[FAIL] ' X FILE: ':' HH0,line:
|
||||
' expected: ' HH0,expected:
|
||||
' actual: ' HH0,actual:
|
||||
R
|
||||
%0:
|
||||
@@ -0,0 +1,3 @@
|
||||
output_ald = testSA.ALD
|
||||
sys_ver = 3.8
|
||||
hed = test.hed
|
||||
Reference in New Issue
Block a user