-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
163 additions
and
17 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
35 changes: 34 additions & 1 deletion
35
rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt
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 |
---|---|---|
@@ -1,3 +1,36 @@ | ||
package com.smeup.rpgparser.smeup | ||
|
||
open class MULANGT10BaseCodopTest : MULANGTTest() | ||
import org.junit.Test | ||
import kotlin.test.assertEquals | ||
|
||
open class MULANGT10BaseCodopTest : MULANGTTest() { | ||
/** | ||
* DIV and MVR with indicators | ||
* @see #245 | ||
*/ | ||
@Test | ||
fun executeT10_A20_P52() { | ||
val expected = listOf("A20_N73(2.272) A20_N70(0) A20_N112(11.11) A20_N110(0) A20_N309(4.889964788)") | ||
assertEquals(expected, "smeup/T10_A20_P52".outputOf(configuration = smeupConfig)) | ||
} | ||
|
||
/** | ||
* SCAN with array in input | ||
* @see #218 | ||
*/ | ||
@Test | ||
fun executeT10_A35_P08() { | ||
val expected = listOf<String>("A35_AR1(2)(123&5) IN45(1)") | ||
assertEquals(expected, "smeup/T10_A35_P08".outputOf(configuration = smeupConfig)) | ||
} | ||
|
||
/** | ||
* SCAN with array in result | ||
* @see #244 | ||
*/ | ||
@Test | ||
fun executeT10_A35_P10() { | ||
val expected = listOf<String>("A35_AR2(01)(5) A35_AR2(02)(6) A35_AR2(03)(0) IN20(1)") | ||
assertEquals(expected, "smeup/T10_A35_P10".outputOf(configuration = smeupConfig)) | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
rpgJavaInterpreter-core/src/test/resources/smeup/T02_A80_P01.rpgle
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,10 @@ | ||
D A80_A10 S 10 | ||
D A80_N50 S 5 0 | ||
D £DBG_Str S 50 VARYING | ||
|
||
C CLEAR A80_A10 10 | ||
C CLEAR A80_N50 5 0 | ||
C EVAL A80_A10 = 'ABCDEFGHIJ' | ||
C EVAL A80_N50 = 12345 | ||
C EVAL £DBG_Str=%TRIM(A80_A10)+%CHAR(A80_N50) | ||
C £DBG_Str DSPLY |
28 changes: 28 additions & 0 deletions
28
rpgJavaInterpreter-core/src/test/resources/smeup/T10_A20_P52.rpgle
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,28 @@ | ||
D £DBG_Str S 150 VARYING | ||
|
||
D A20_N70 S 20P 0 | ||
D A20_N73 S 20P 3 | ||
D A20_N110 S 11P 0 | ||
D A20_N112 S 11P 2 | ||
D A20_N309 S 30P 9 | ||
|
||
C EXSR SUB_A20_I | ||
C EVAL £DBG_Str='A20_N73('+%CHAR(A20_N73)+')' | ||
C +' A20_N70('+%CHAR(A20_N70)+')' | ||
C +' A20_N112('+%CHAR(A20_N112)+')' | ||
C +' A20_N110('+%CHAR(A20_N110)+')' | ||
C +' A20_N309('+%CHAR(A20_N309)+')' | ||
|
||
C £DBG_Str DSPLY | ||
|
||
*--------------------------------------------------------------------- | ||
C SUB_A20_I BEGSR | ||
* | ||
C SETOFF 22 | ||
C SETON 23 | ||
C N2225 DIV 11 A20_N73 | ||
C N22 MVR A20_N70 | ||
C 23100 DIV 9 A20_N112 | ||
C 23 MVR A20_N110 | ||
C A20_N112 DIV A20_N73 A20_N309 | ||
C ENDSR |
18 changes: 18 additions & 0 deletions
18
rpgJavaInterpreter-core/src/test/resources/smeup/T10_A35_P08.rpgle
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,18 @@ | ||
D £DBG_Str S 150 VARYING | ||
D A35_AR1 S 70 DIM(10) | ||
D A35_A1 S 6 | ||
D A35_A2 S 1 | ||
D A35_AR2 S 2 0 DIM(5) | ||
D $A S 1 0 | ||
D I S 2 0 | ||
|
||
C EVAL A35_AR1(1)='ABCDEF' | ||
C EVAL A35_AR1(2)='123&5' | ||
C EVAL A35_AR1(3)='TEST&' | ||
C EVAL I = 2 | ||
C '&' SCAN A35_AR1(I):1 45 | ||
C EVAL £DBG_Str= | ||
C 'A35_AR1(2)('+%TRIMR(A35_AR1(2))+') ' | ||
C +'IN45('+%CHAR(*IN45)+')' | ||
|
||
C £DBG_Str DSPLY |
20 changes: 20 additions & 0 deletions
20
rpgJavaInterpreter-core/src/test/resources/smeup/T10_A35_P10.rpgle
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,20 @@ | ||
D £DBG_Str S 150 VARYING | ||
D A35_AR1 S 70 DIM(10) | ||
D A35_A1 S 6 | ||
D A35_A2 S 1 | ||
D A35_AR2 S 2 0 DIM(5) | ||
D $A S 1 0 | ||
D I S 2 0 | ||
|
||
C SETOFF 20 | ||
C EVAL A35_A1='YARRYY' | ||
C EVAL A35_A2='Y' | ||
C EVAL $A=3 | ||
C A35_A2 SCAN A35_A1:$A A35_AR2 20 | ||
C EVAL £DBG_Str= | ||
C 'A35_AR2(01)('+%CHAR(A35_AR2(01))+') ' | ||
C +'A35_AR2(02)('+%CHAR(A35_AR2(02))+') ' | ||
C +'A35_AR2(03)('+%CHAR(A35_AR2(03))+') ' | ||
C +'IN20('+%CHAR(*IN20)+')' | ||
|
||
C £DBG_Str DSPLY |