Skip to content

Commit

Permalink
Use modified Kirikiri official test script in Maven test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Student Main committed May 28, 2019
1 parent 870f90b commit 201ecef
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion kirikiri-tjs/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Link: https://github.com/krkrz/kwidgets

### test_scripts

Official TJS2 test script
Official TJS2 test script, modified to work without preprocessor.

Link: https://github.com/krkrz/test_scripts

Expand Down
48 changes: 24 additions & 24 deletions kirikiri-tjs/example/test_scripts/test_variant.tjs
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,19 @@ function testVariant() {
}
tmp = -1;
tmp >>>= 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>>= 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>>= 1,"+tmp);
isFaild = true;
}
@endif
//@endif
tmp = 10;
if( int10 == 9 || tmp == 10 ) {
} else {
Expand All @@ -366,20 +366,20 @@ function testVariant() {
isFaild = true;
}
tmp = -1 >>> 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>> 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>> 1,"+tmp);
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
//@endif
tmp = int5 == 5 ? 1 : 0;
if( tmp != 1 ) {
Debug.message("faild:tmp = int5 == 5 ? 1 : 0;");
Expand Down Expand Up @@ -702,19 +702,19 @@ function testVariant() {
}
tmp = -1.0;
tmp >>>= 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>>= 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>>= 1,"+tmp);
isFaild = true;
}
@endif
//@endif
tmp = 10.0;
if( real10 == 9.0 || tmp == 10.0 ) {
} else {
Expand All @@ -739,20 +739,20 @@ function testVariant() {
isFaild = true;
}
tmp = -1.0 >>> 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>> 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>> 1,"+tmp);
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
//@endif
tmp = real5 == 5.0 ? 1.0 : 0.0;
if( tmp != 1 ) {
Debug.message("faild:tmp = real5 == 5 ? 1 : 0;");
Expand Down Expand Up @@ -1037,19 +1037,19 @@ function testVariant() {
}
tmp = "-1";
tmp >>>= 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>>= 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>>= 1,"+tmp);
isFaild = true;
}
@endif
//@endif
tmp = "10";
if( str10 == 9 || tmp == 10 ) {
} else {
Expand All @@ -1074,20 +1074,20 @@ function testVariant() {
isFaild = true;
}
tmp = "-1" >>> 1;
@if(environment > 0) // java
/*@if(environment > 0) // java
if( tmp != 2147483647 ) {
Debug.message("faild:-1 >>> 1");
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
@if(environment == 0) // windows
@endif*/
//@if(environment == 0) // windows
if( tmp != 9223372036854775807 ) {
Debug.message("faild:-1 >>> 1,"+tmp);
Debug.message("int型ではこうなるが、longが内部型になるとこのテストは正しくない。値を変えるべき");
isFaild = true;
}
@endif
//@endif
tmp = str5 == "5" ? 1 : 0;
if( tmp != 1 ) {
Debug.message("faild:tmp = str5 == 5 ? 1 : 0;");
Expand Down
2 changes: 1 addition & 1 deletion kirikiri-tjs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<entryPoint>program</entryPoint>
<grammarName>TJS</grammarName>
<packageName></packageName>
<exampleFiles>example/kag3_ham</exampleFiles>
<exampleFiles>example/test_scripts</exampleFiles>
</configuration>
<executions>
<execution>
Expand Down
2 changes: 1 addition & 1 deletion kirikiri-tjs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ERR=lasterror.txt
DEFAULTTEST=example/**/*.tjs
TEST=${@:-$DEFAULTTEST}
FAIL=0
for i in $TEST
time for i in $TEST
do
echo Test $i
cat $i | node preprocess.js | grun TJS program 2> $ERR
Expand Down

0 comments on commit 201ecef

Please sign in to comment.