From 8df0094364f48365b48782e8c7d5c293a9cf900c Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 07:59:08 +0100 Subject: [PATCH 01/19] Added `MUDRNRAPU00183` which works --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 10 ++++++++++ .../test/resources/smeup/MUDRNRAPU00183.rpgle | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 574e55fc0..3d6663aa9 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -810,4 +810,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00181".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between *HIVAL, at left side, and String by using "not equal" operator. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00183() { + val expected = listOf("TRUE", "END") + assertEquals(expected, "smeup/MUDRNRAPU00183".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle new file mode 100644 index 000000000..cda3302e7 --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle @@ -0,0 +1,18 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between *HIVAL, at left side, and String + O * by using "not equal" operator. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D$$AZIE S 2 DIM(100) INZ('FF') + + C IF *HIVAL<>$$AZIE(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From 3e902485e0e930885ed94e21efc6c9acebd404e4 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 08:01:48 +0100 Subject: [PATCH 02/19] Improved `MUDRNRAPU00183` by adding `*HIVAL` at right side --- .../com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt | 2 +- .../src/test/resources/smeup/MUDRNRAPU00183.rpgle | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 3d6663aa9..fc4efcb68 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -817,7 +817,7 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { */ @Test fun executeMUDRNRAPU00183() { - val expected = listOf("TRUE", "END") + val expected = listOf("TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00183".outputOf(configuration = smeupConfig)) } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle index cda3302e7..23b4abaa7 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle @@ -2,8 +2,8 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL, at left side, and String - O * by using "not equal" operator. + O * Comparison between *HIVAL and String by using "not equal" + O * operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. @@ -15,4 +15,9 @@ C ENDIF C 'END' DSPLY + C IF $$AZIE(1)<>*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From 3e188a5b9c2b55b82b2e43932a3aa9a0064b831a Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 08:31:55 +0100 Subject: [PATCH 03/19] Typo --- .../kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index fc4efcb68..c2b352ad3 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -812,7 +812,7 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL, at left side, and String by using "not equal" operator. + * Comparison between *HIVAL and String by using "not equal" operator. * @see #LS24005329 */ @Test From 303349bb95322073916fdb2d9f1fbaa168901a2a Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 08:33:46 +0100 Subject: [PATCH 04/19] Added `MUDRNRAPU00184` to compare `*HIVAL` as greater than other. --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 10 ++++++++ .../test/resources/smeup/MUDRNRAPU00184.rpgle | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index c2b352ad3..6cbb57d26 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -820,4 +820,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00183".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between *HIVAL and String by using "greater" operator for `*HIVAL`. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00184() { + val expected = listOf("TRUE", "END", "TRUE", "END") + assertEquals(expected, "smeup/MUDRNRAPU00184".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle new file mode 100644 index 000000000..8ad35c2a4 --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle @@ -0,0 +1,23 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between *HIVAL and String by using "greater" + O * operator for `*HIVAL`. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D$$AZIE S 2 DIM(100) INZ('FF') + + C IF *HIVAL>$$AZIE(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF $$AZIE(1)<*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From 7673ec87b75338914b9a5f6d0e08274163a3c838 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:03:44 +0100 Subject: [PATCH 05/19] Applied fix for `MUDRNRAPU00184` --- .../kotlin/com/smeup/rpgparser/interpreter/values.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt index 9b2d02a26..ac546c3a5 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt @@ -211,6 +211,7 @@ data class StringValue(var value: String, var varying: Boolean = false) : Abstra override operator fun compareTo(other: Value): Int = when (other) { is StringValue -> compare(other, DEFAULT_CHARSET) + is HiValValue -> if (this == this.hiValue()) 0 else -1 is BlanksValue -> if (this.isBlank()) EQUAL else SMALLER is BooleanValue -> if (this.value.isInt() && this.value.toInt() == other.value.toInt()) EQUAL else GREATER else -> super.compareTo(other) @@ -801,8 +802,12 @@ object HiValValue : Value { override fun copy(): HiValValue = this - override operator fun compareTo(other: Value): Int = - if (other is HiValValue) 0 else 1 + override operator fun compareTo(other: Value): Int { + return when (other) { + is StringValue -> if (other.hiValue() == other) 0 else 1 + else -> if (other is HiValValue) 0 else 1 + } + } override fun asString(): StringValue { TODO("Not yet implemented") From 6f82e65e69624ea4599e46bedfc04172e3e25c93 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:07:43 +0100 Subject: [PATCH 06/19] Added `MUDRNRAPU00185` to compare `*HIVAL` as greater/equal than other, which works --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 10 ++++++++ .../test/resources/smeup/MUDRNRAPU00185.rpgle | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 6cbb57d26..b745371b6 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -830,4 +830,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00184".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between *HIVAL and String by using "greater/equal" operator for `*HIVAL`. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00185() { + val expected = listOf("TRUE", "END", "TRUE", "END") + assertEquals(expected, "smeup/MUDRNRAPU00185".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle new file mode 100644 index 000000000..7bee40a8e --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle @@ -0,0 +1,23 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between *HIVAL and String by using "greater/equal" + O * operator for `*HIVAL`. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D$$AZIE S 2 DIM(100) INZ('FF') + + C IF *HIVAL>=$$AZIE(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF $$AZIE(1)<=*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From 93744d64bda753f84b912eae9ebf8e28d4922778 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:13:19 +0100 Subject: [PATCH 07/19] Added `MUDRNRAPU00186` to compare `*HIVAL` as lower than other, which works --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 10 ++++++++ .../test/resources/smeup/MUDRNRAPU00186.rpgle | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index b745371b6..4b8d075d9 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -840,4 +840,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00185".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between *HIVAL and String by using "lower" operator for `*HIVAL`. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00186() { + val expected = listOf("END", "END") + assertEquals(expected, "smeup/MUDRNRAPU00186".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle new file mode 100644 index 000000000..957282c66 --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle @@ -0,0 +1,23 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between *HIVAL and String by using "lower" + O * operator for `*HIVAL`. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D$$AZIE S 2 DIM(100) INZ('FF') + + C IF *HIVAL<$$AZIE(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF $$AZIE(1)>*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From 1d411e5cb5ada13a321001058037c755bd9e6a0b Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:15:06 +0100 Subject: [PATCH 08/19] Added `MUDRNRAPU00187` to compare `*HIVAL` as lower/equal than other, which works --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 10 ++++++++ .../test/resources/smeup/MUDRNRAPU00187.rpgle | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 4b8d075d9..aa635c82d 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -850,4 +850,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("END", "END") assertEquals(expected, "smeup/MUDRNRAPU00186".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between *HIVAL and String by using "lower/equal" operator for `*HIVAL`. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00187() { + val expected = listOf("END", "END") + assertEquals(expected, "smeup/MUDRNRAPU00187".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle new file mode 100644 index 000000000..cbc5b4b8a --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle @@ -0,0 +1,23 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between *HIVAL and String by using "lower/equal" + O * operator for `*HIVAL`. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D$$AZIE S 2 DIM(100) INZ('FF') + + C IF *HIVAL<=$$AZIE(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF $$AZIE(1)>=*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From fc6b88203d6e1476ad537cd95061d38249e2adb0 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:20:50 +0100 Subject: [PATCH 09/19] Changed name of variable for each test --- .../src/test/resources/smeup/MUDRNRAPU00183.rpgle | 6 +++--- .../src/test/resources/smeup/MUDRNRAPU00184.rpgle | 6 +++--- .../src/test/resources/smeup/MUDRNRAPU00185.rpgle | 6 +++--- .../src/test/resources/smeup/MUDRNRAPU00186.rpgle | 6 +++--- .../src/test/resources/smeup/MUDRNRAPU00187.rpgle | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle index 23b4abaa7..8f4993379 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle @@ -8,14 +8,14 @@ O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== - D$$AZIE S 2 DIM(100) INZ('FF') + D ARR01 S 2 DIM(10) INZ('FF') - C IF *HIVAL<>$$AZIE(1) + C IF *HIVAL<>ARR01(1) C 'TRUE' DSPLY C ENDIF C 'END' DSPLY - C IF $$AZIE(1)<>*HIVAL + C IF ARR01(1)<>*HIVAL C 'TRUE' DSPLY C ENDIF C 'END' DSPLY diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle index 8ad35c2a4..e400ef7ed 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle @@ -8,14 +8,14 @@ O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== - D$$AZIE S 2 DIM(100) INZ('FF') + D ARR01 S 2 DIM(10) INZ('FF') - C IF *HIVAL>$$AZIE(1) + C IF *HIVAL>ARR01(1) C 'TRUE' DSPLY C ENDIF C 'END' DSPLY - C IF $$AZIE(1)<*HIVAL + C IF ARR01(1)<*HIVAL C 'TRUE' DSPLY C ENDIF C 'END' DSPLY diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle index 7bee40a8e..aa64fec85 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle @@ -8,14 +8,14 @@ O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== - D$$AZIE S 2 DIM(100) INZ('FF') + D ARR01 S 2 DIM(10) INZ('FF') - C IF *HIVAL>=$$AZIE(1) + C IF *HIVAL>=ARR01(1) C 'TRUE' DSPLY C ENDIF C 'END' DSPLY - C IF $$AZIE(1)<=*HIVAL + C IF ARR01(1)<=*HIVAL C 'TRUE' DSPLY C ENDIF C 'END' DSPLY diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle index 957282c66..f1c236130 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle @@ -8,14 +8,14 @@ O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== - D$$AZIE S 2 DIM(100) INZ('FF') + D ARR01 S 2 DIM(10) INZ('FF') - C IF *HIVAL<$$AZIE(1) + C IF *HIVAL*HIVAL + C IF ARR01(1)>*HIVAL C 'TRUE' DSPLY C ENDIF C 'END' DSPLY diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle index cbc5b4b8a..cc0c2ef1d 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle @@ -8,14 +8,14 @@ O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== - D$$AZIE S 2 DIM(100) INZ('FF') + D ARR01 S 2 DIM(10) INZ('FF') - C IF *HIVAL<=$$AZIE(1) + C IF *HIVAL<=ARR01(1) C 'TRUE' DSPLY C ENDIF C 'END' DSPLY - C IF $$AZIE(1)>=*HIVAL + C IF ARR01(1)>=*HIVAL C 'TRUE' DSPLY C ENDIF C 'END' DSPLY From 2b00a54d4ff5e8b5a4a985b5e44dc12c525394f5 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:24:40 +0100 Subject: [PATCH 10/19] Improved `MUDRNRAPU00183` by adding same comparison but with another variable defined as `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 7 +++++-- .../test/resources/smeup/MUDRNRAPU00183.rpgle | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index aa635c82d..b31bc8fd0 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -812,12 +812,15 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL and String by using "not equal" operator. + * Comparison between: + * - *HIVAL and String, + * - *HIVAL and *HIVAL + * by using "not equal" operator. * @see #LS24005329 */ @Test fun executeMUDRNRAPU00183() { - val expected = listOf("TRUE", "END", "TRUE", "END") + val expected = listOf("TRUE", "END", "TRUE", "END", "END", "END") assertEquals(expected, "smeup/MUDRNRAPU00183".outputOf(configuration = smeupConfig)) } diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle index 8f4993379..9afcb5750 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00183.rpgle @@ -2,13 +2,16 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL and String by using "not equal" - O * operator. + O * Comparison between: + O * - *HIVAL and String, + O * - *HIVAL and *HIVAL + O * by using "not equal" operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ(*HIVAL) C IF *HIVAL<>ARR01(1) C 'TRUE' DSPLY @@ -20,4 +23,14 @@ C ENDIF C 'END' DSPLY + C IF *HIVAL<>ARR02(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF ARR02(1)<>*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From 1c102bc8c70ac639e85f20d66c5060ca61d1a765 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:26:36 +0100 Subject: [PATCH 11/19] Improved `MUDRNRAPU00184` by adding same comparison but with another variable defined as `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 7 +++++-- .../test/resources/smeup/MUDRNRAPU00184.rpgle | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index b31bc8fd0..ce2da2704 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -825,12 +825,15 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL and String by using "greater" operator for `*HIVAL`. + * Comparison between: + * - *HIVAL and String, + * - *HIVAL and *HIVAL + * by using "greater" operator. * @see #LS24005329 */ @Test fun executeMUDRNRAPU00184() { - val expected = listOf("TRUE", "END", "TRUE", "END") + val expected = listOf("TRUE", "END", "TRUE", "END", "END", "END") assertEquals(expected, "smeup/MUDRNRAPU00184".outputOf(configuration = smeupConfig)) } diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle index e400ef7ed..e2d166b57 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00184.rpgle @@ -2,13 +2,16 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL and String by using "greater" - O * operator for `*HIVAL`. + O * Comparison between: + O * - *HIVAL and String, + O * - *HIVAL and *HIVAL + O * by using "greater" operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ(*HIVAL) C IF *HIVAL>ARR01(1) C 'TRUE' DSPLY @@ -20,4 +23,14 @@ C ENDIF C 'END' DSPLY + C IF *HIVAL>ARR02(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF ARR02(1)<*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From 59265d2db0d6e3e560abd75369b96a87a13724b7 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:28:50 +0100 Subject: [PATCH 12/19] Improved `MUDRNRAPU00185` by adding same comparison but with another variable defined as `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 7 +++++-- .../test/resources/smeup/MUDRNRAPU00185.rpgle | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index ce2da2704..9b2d9ec0b 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -838,12 +838,15 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL and String by using "greater/equal" operator for `*HIVAL`. + * Comparison between: + * - *HIVAL and String, + * - *HIVAL and *HIVAL + * by using "greater/equals" operator. * @see #LS24005329 */ @Test fun executeMUDRNRAPU00185() { - val expected = listOf("TRUE", "END", "TRUE", "END") + val expected = listOf("TRUE", "END", "TRUE", "END", "TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00185".outputOf(configuration = smeupConfig)) } diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle index aa64fec85..5983bce6c 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle @@ -2,13 +2,16 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL and String by using "greater/equal" - O * operator for `*HIVAL`. + O * Comparison between: + O * - *HIVAL and String, + O * - *HIVAL and *HIVAL + O * by using "greater/equal" operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ('FF') C IF *HIVAL>=ARR01(1) C 'TRUE' DSPLY @@ -20,4 +23,14 @@ C ENDIF C 'END' DSPLY + C IF *HIVAL>=ARR02(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF ARR02(1)<=*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From 97110a836773705aa0c8b1ab643e028982d2711c Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:32:52 +0100 Subject: [PATCH 13/19] Improved `MUDRNRAPU00186` by adding same comparison but with another variable defined as `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 9 ++++++--- .../test/resources/smeup/MUDRNRAPU00186.rpgle | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 9b2d9ec0b..e5b1faf93 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -841,7 +841,7 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { * Comparison between: * - *HIVAL and String, * - *HIVAL and *HIVAL - * by using "greater/equals" operator. + * by using "greater/equal" operator. * @see #LS24005329 */ @Test @@ -851,12 +851,15 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL and String by using "lower" operator for `*HIVAL`. + * Comparison between: + * - *HIVAL and String, + * - *HIVAL and *HIVAL + * by using "lower" operator. * @see #LS24005329 */ @Test fun executeMUDRNRAPU00186() { - val expected = listOf("END", "END") + val expected = listOf("END", "END", "END", "END") assertEquals(expected, "smeup/MUDRNRAPU00186".outputOf(configuration = smeupConfig)) } diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle index f1c236130..d603977f4 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle @@ -2,13 +2,16 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL and String by using "lower" - O * operator for `*HIVAL`. + O * Comparison between: + O * - *HIVAL and String, + O * - *HIVAL and *HIVAL + O * by using "lower" operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ('FF') C IF *HIVAL*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From 4d6a115eaafa47e3234d4627b171454cb6a94d2b Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:36:28 +0100 Subject: [PATCH 14/19] Fixed second array initialization --- .../src/test/resources/smeup/MUDRNRAPU00185.rpgle | 2 +- .../src/test/resources/smeup/MUDRNRAPU00186.rpgle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle index 5983bce6c..c93844b4e 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00185.rpgle @@ -11,7 +11,7 @@ O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') - D ARR02 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ(*HIVAL) C IF *HIVAL>=ARR01(1) C 'TRUE' DSPLY diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle index d603977f4..f8c44e453 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00186.rpgle @@ -11,7 +11,7 @@ O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') - D ARR02 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ(*HIVAL) C IF *HIVAL Date: Tue, 10 Dec 2024 09:38:13 +0100 Subject: [PATCH 15/19] Improved `MUDRNRAPU00187` by adding same comparison but with another variable defined as `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 7 +++++-- .../test/resources/smeup/MUDRNRAPU00187.rpgle | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index e5b1faf93..814225df8 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -864,12 +864,15 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { } /** - * Comparison between *HIVAL and String by using "lower/equal" operator for `*HIVAL`. + * Comparison between: + * - *HIVAL and String, + * - *HIVAL and *HIVAL + * by using "lower/equal" operator. * @see #LS24005329 */ @Test fun executeMUDRNRAPU00187() { - val expected = listOf("END", "END") + val expected = listOf("END", "END", "TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00187".outputOf(configuration = smeupConfig)) } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle index cc0c2ef1d..b100d71a9 100644 --- a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00187.rpgle @@ -2,13 +2,16 @@ V* 10/12/2024 APU001 Creation V* ============================================================== O * PROGRAM GOAL - O * Comparison between *HIVAL and String by using "lower/equal" - O * operator for `*HIVAL`. + O * Comparison between: + O * - *HIVAL and String, + O * - *HIVAL and *HIVAL + O * by using "lower/equal" operator. V* ============================================================== O * JARIKO ANOMALY O * The expression is not evaluated when it's true. V* ============================================================== D ARR01 S 2 DIM(10) INZ('FF') + D ARR02 S 2 DIM(10) INZ(*HIVAL) C IF *HIVAL<=ARR01(1) C 'TRUE' DSPLY @@ -20,4 +23,14 @@ C ENDIF C 'END' DSPLY + C IF *HIVAL<=ARR02(1) + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C IF ARR02(1)>=*HIVAL + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + C SETON LR \ No newline at end of file From e507ed09fa20f8006b6407850ea7ad5886ee4e70 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:50:00 +0100 Subject: [PATCH 16/19] Implemented `MUDRNRAPU00188` which test a comparison, with "equal" operator, between two variable defined with different number of chars but initialized with `*HIVAL` --- .../rpgparser/smeup/MULANGT10BaseCodopTest.kt | 13 ++++++++++++ .../test/resources/smeup/MUDRNRAPU00188.rpgle | 21 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00188.rpgle diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt index 814225df8..b398c4bd6 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/smeup/MULANGT10BaseCodopTest.kt @@ -875,4 +875,17 @@ open class MULANGT10BaseCodopTest : MULANGTTest() { val expected = listOf("END", "END", "TRUE", "END", "TRUE", "END") assertEquals(expected, "smeup/MUDRNRAPU00187".outputOf(configuration = smeupConfig)) } + + /** + * Comparison between: + * - *HIVAL as Standalone of 2 chars, + * - *HIVAL as Standalone of 4 chars, + * by using "equal" operator. + * @see #LS24005329 + */ + @Test + fun executeMUDRNRAPU00188() { + val expected = listOf("END") + assertEquals(expected, "smeup/MUDRNRAPU00188".outputOf(configuration = smeupConfig)) + } } \ No newline at end of file diff --git a/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00188.rpgle b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00188.rpgle new file mode 100644 index 000000000..e49bcaf26 --- /dev/null +++ b/rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00188.rpgle @@ -0,0 +1,21 @@ + V* ============================================================== + V* 10/12/2024 APU001 Creation + V* ============================================================== + O * PROGRAM GOAL + O * Comparison between: + O * - *HIVAL as Standalone of 2 chars, + O * - *HIVAL as Standalone of 4 chars, + O * by using "equal" operator. + V* ============================================================== + O * JARIKO ANOMALY + O * The expression is not evaluated when it's true. + V* ============================================================== + D D1 S 2 INZ(*HIVAL) + D D2 S 4 INZ(*HIVAL) + + C IF D1=D2 + C 'TRUE' DSPLY + C ENDIF + C 'END' DSPLY + + C SETON LR \ No newline at end of file From a9c98d4a2bd625720edc542a3b3e5da4f4b1f454 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:54:28 +0100 Subject: [PATCH 17/19] Using constants instead numeric value --- .../main/kotlin/com/smeup/rpgparser/interpreter/values.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt index ac546c3a5..11e1e685b 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt @@ -211,7 +211,7 @@ data class StringValue(var value: String, var varying: Boolean = false) : Abstra override operator fun compareTo(other: Value): Int = when (other) { is StringValue -> compare(other, DEFAULT_CHARSET) - is HiValValue -> if (this == this.hiValue()) 0 else -1 + is HiValValue -> if (this == this.hiValue()) EQUAL else SMALLER is BlanksValue -> if (this.isBlank()) EQUAL else SMALLER is BooleanValue -> if (this.value.isInt() && this.value.toInt() == other.value.toInt()) EQUAL else GREATER else -> super.compareTo(other) @@ -804,8 +804,8 @@ object HiValValue : Value { override operator fun compareTo(other: Value): Int { return when (other) { - is StringValue -> if (other.hiValue() == other) 0 else 1 - else -> if (other is HiValValue) 0 else 1 + is StringValue -> if (other.hiValue() == other) EQUAL else GREATER + else -> if (other is HiValValue) EQUAL else GREATER // TODO: Is much generic. Provide atomic cases. } } From e1926d5438c3f82edb537fecd9e3ce1fd509a81a Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Tue, 10 Dec 2024 09:58:22 +0100 Subject: [PATCH 18/19] Fixed error after Kotlin Check --- .../src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt index 11e1e685b..3e0d9d34b 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/values.kt @@ -805,7 +805,8 @@ object HiValValue : Value { override operator fun compareTo(other: Value): Int { return when (other) { is StringValue -> if (other.hiValue() == other) EQUAL else GREATER - else -> if (other is HiValValue) EQUAL else GREATER // TODO: Is much generic. Provide atomic cases. + // TODO: Is much generic. Provide atomic cases. + else -> if (other is HiValValue) EQUAL else GREATER } } From 8f21485008c0d3e759449234f1fb4280627993e9 Mon Sep 17 00:00:00 2001 From: lanarimarco Date: Tue, 10 Dec 2024 12:33:43 +0100 Subject: [PATCH 19/19] deps: remove fifesoft deps --- kolasu/build.gradle | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/kolasu/build.gradle b/kolasu/build.gradle index 9b6bab026..2149f051f 100644 --- a/kolasu/build.gradle +++ b/kolasu/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Sme.UP S.p.A. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + //----------------- //kolasu build script //----------------- @@ -42,8 +58,6 @@ dependencies { testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion" testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion" - implementation 'com.fifesoft:rsyntaxtextarea:3.5.2' - implementation 'com.fifesoft:autocomplete:3.3.1' implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion" implementation "org.jetbrains.kotlinx:kotlinx-serialization-cbor:$serializationVersion"