Skip to content

Commit

Permalink
Implemented tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Sep 19, 2024
1 parent a8207d3 commit 08b3413
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,43 @@ open class MULANGT10BaseCodopTest : MULANGTTest() {
)
assertEquals(expected, "smeup/MUDRNRAPU00116".outputOf(configuration = smeupConfig))
}

/**
* Assignment of a scalar to an array, where the digits of scalar are lower than decimal's digits of array type.
* @see #LS24004106
*/
@Test
fun executeMUDRNRAPU00117() {
val expected = listOf(
".000000", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000",
".000123", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000", ".000000"
)
assertEquals(expected, "smeup/MUDRNRAPU00117".outputOf(configuration = smeupConfig))
}

/**
* Assignment of a scalar to an array, where the digits of scalar are greater than decimal's digits of array type.
* @see #LS24004106
*/
@Test
fun executeMUDRNRAPU00118() {
val expected = listOf(
".00", ".00", ".00", ".00", ".00", ".00", ".00", ".00", ".00",
"123.45", ".00", ".00", ".00", ".00", ".00", ".00", ".00", ".00"
)
assertEquals(expected, "smeup/MUDRNRAPU00118".outputOf(configuration = smeupConfig))
}

/**
* Assignment of a scalar to an array, declared as integer type too.
* @see #LS24004106
*/
@Test
fun executeMUDRNRAPU00119() {
val expected = listOf(
"0", "0", "0", "0", "0", "0", "0", "0", "0",
"123", "0", "0", "0", "0", "0", "0", "0", "0"
)
assertEquals(expected, "smeup/MUDRNRAPU00119".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
D MSG S 30
D COUNT S 3 0 INZ(1)

D A146 S 14 6 DIM(9) INZ

C EXSR SHOR_RES
C MOVEA 123 A146
C EXSR SHOR_RES

C SETON LR



C SHOR_RES BEGSR

C EVAL COUNT=1
C 10 DOUEQ COUNT
C EVAL MSG=%CHAR(A146(COUNT))
C MSG DSPLY
C EVAL COUNT+=1
C ENDDO

C ENDSR
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
D MSG S 30
D COUNT S 3 0 INZ(1)

D A142 S 14 2 DIM(9) INZ

C EXSR SHOR_RES
C MOVEA 12345 A142
C EXSR SHOR_RES

C SETON LR



C SHOR_RES BEGSR

C EVAL COUNT=1
C 10 DOUEQ COUNT
C EVAL MSG=%CHAR(A142(COUNT))
C MSG DSPLY
C EVAL COUNT+=1
C ENDDO

C ENDSR
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
D MSG S 30
D COUNT S 3 0 INZ(1)

D A140 S 14 0 DIM(9) INZ

C EXSR SHOR_RES
C MOVEA 123 A140
C EXSR SHOR_RES

C SETON LR



C SHOR_RES BEGSR

C EVAL COUNT=1
C 10 DOUEQ COUNT
C EVAL MSG=%CHAR(A140(COUNT))
C MSG DSPLY
C EVAL COUNT+=1
C ENDDO

C ENDSR

0 comments on commit 08b3413

Please sign in to comment.