From 0a1fd0308680fddfd296af2735fb62dcfcf4ac69 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Tue, 28 Jul 2026 18:23:58 +0100 Subject: [PATCH 1/4] Restore test --- LaraUtils/test/pt/up/fe/specs/lara/LaraSystemToolsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaraUtils/test/pt/up/fe/specs/lara/LaraSystemToolsTest.java b/LaraUtils/test/pt/up/fe/specs/lara/LaraSystemToolsTest.java index b637071dd..80f81ca4f 100644 --- a/LaraUtils/test/pt/up/fe/specs/lara/LaraSystemToolsTest.java +++ b/LaraUtils/test/pt/up/fe/specs/lara/LaraSystemToolsTest.java @@ -126,7 +126,7 @@ void testRunCommand_withNullTimeout_handlesGracefully() { // Given String command = "echo hello"; boolean printToConsole = false; - long timeoutNanos = 2000000000; // 2 seconds + Long timeoutNanos = null; // When ProcessOutputAsString result = LaraSystemTools.runCommand(command, workingDirectory, printToConsole, timeoutNanos); From 66c77ed8a3d3c11abe0c238a2ce1b7279824f016 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Tue, 28 Jul 2026 19:05:10 +0100 Subject: [PATCH 2/4] Preserve enum values in TypeScript interfaces --- Lara-JS/code/generate-ts-joinpoints.test.ts | 34 +++++++++++++++++++++ Lara-JS/scripts/generate-ts-joinpoints.ts | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Lara-JS/code/generate-ts-joinpoints.test.ts diff --git a/Lara-JS/code/generate-ts-joinpoints.test.ts b/Lara-JS/code/generate-ts-joinpoints.test.ts new file mode 100644 index 000000000..3d0710016 --- /dev/null +++ b/Lara-JS/code/generate-ts-joinpoints.test.ts @@ -0,0 +1,34 @@ +import fs from "fs"; +import os from "os"; +import path from "path"; +import { generateEnums } from "../scripts/generate-ts-joinpoints.ts"; + +describe("generateEnums", () => { + it("preserves the enum values from the language specification", () => { + const outputDirectory = fs.mkdtempSync( + path.join(os.tmpdir(), "lara-build-interfaces-"), + ); + const outputPath = path.join(outputDirectory, "Joinpoints.ts"); + const outputFile = fs.openSync(outputPath, "w"); + + try { + generateEnums( + [{ name: "StorageClass", entries: ["NONE", "PRIVATE_EXTERN", "STATIC"] }], + outputFile, + ); + } finally { + fs.closeSync(outputFile); + } + + try { + expect(fs.readFileSync(outputPath, "utf8")).toContain( + ' STATIC: "STATIC",', + ); + expect(fs.readFileSync(outputPath, "utf8")).toContain( + ' PRIVATE_EXTERN: "PRIVATE_EXTERN",', + ); + } finally { + fs.rmSync(outputDirectory, { recursive: true, force: true }); + } + }); +}); diff --git a/Lara-JS/scripts/generate-ts-joinpoints.ts b/Lara-JS/scripts/generate-ts-joinpoints.ts index 9d6dbe111..e65555c3f 100644 --- a/Lara-JS/scripts/generate-ts-joinpoints.ts +++ b/Lara-JS/scripts/generate-ts-joinpoints.ts @@ -207,7 +207,7 @@ function generateEnum(e: ConvertedEnum, outputFile: number) { */\n`); fs.writeSync(outputFile, `export const ${e.name} = {\n`); e.entries.forEach((entry) => { - fs.writeSync(outputFile, ` ${entry}: "${entry.toLowerCase()}",\n`); + fs.writeSync(outputFile, ` ${entry}: "${entry}",\n`); }); fs.writeSync(outputFile, `} as const;\n`); fs.writeSync( From b140366f92354e34a9dd44f946744b2b7583c2e2 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Tue, 4 Aug 2026 14:57:41 +0100 Subject: [PATCH 3/4] refactor: simplify enum generator test --- Lara-JS/code/generate-ts-joinpoints.test.ts | 27 +++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Lara-JS/code/generate-ts-joinpoints.test.ts b/Lara-JS/code/generate-ts-joinpoints.test.ts index 3d0710016..9976c1152 100644 --- a/Lara-JS/code/generate-ts-joinpoints.test.ts +++ b/Lara-JS/code/generate-ts-joinpoints.test.ts @@ -9,24 +9,21 @@ describe("generateEnums", () => { path.join(os.tmpdir(), "lara-build-interfaces-"), ); const outputPath = path.join(outputDirectory, "Joinpoints.ts"); - const outputFile = fs.openSync(outputPath, "w"); try { - generateEnums( - [{ name: "StorageClass", entries: ["NONE", "PRIVATE_EXTERN", "STATIC"] }], - outputFile, - ); - } finally { - fs.closeSync(outputFile); - } + const outputFile = fs.openSync(outputPath, "w"); + try { + generateEnums( + [{ name: "StorageClass", entries: ["NONE", "PRIVATE_EXTERN", "STATIC"] }], + outputFile, + ); + } finally { + fs.closeSync(outputFile); + } - try { - expect(fs.readFileSync(outputPath, "utf8")).toContain( - ' STATIC: "STATIC",', - ); - expect(fs.readFileSync(outputPath, "utf8")).toContain( - ' PRIVATE_EXTERN: "PRIVATE_EXTERN",', - ); + const output = fs.readFileSync(outputPath, "utf8"); + expect(output).toContain(' STATIC: "STATIC",'); + expect(output).toContain(' PRIVATE_EXTERN: "PRIVATE_EXTERN",'); } finally { fs.rmSync(outputDirectory, { recursive: true, force: true }); } From 292b88b7a5a6080c9644beb9b3dee692e66b9058 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Wed, 15 Jul 2026 15:40:57 +0100 Subject: [PATCH 4/4] build: upgrade Mockito for JDK 26 --- LARAI/build.gradle | 5 ++--- LaraUtils/build.gradle | 5 ++--- WeaverGen2/build.gradle | 5 ++--- WeaverInterface/build.gradle | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/LARAI/build.gradle b/LARAI/build.gradle index 49442f7a2..e2fe0b7c7 100644 --- a/LARAI/build.gradle +++ b/LARAI/build.gradle @@ -27,10 +27,9 @@ dependencies { // Testing dependencies testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' - testImplementation 'org.mockito:mockito-core:5.5.0' - testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0' + testImplementation 'org.mockito:mockito-core:5.23.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.23.0' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' // For static mocking testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0' } diff --git a/LaraUtils/build.gradle b/LaraUtils/build.gradle index 6fc158ab3..fefa47eba 100644 --- a/LaraUtils/build.gradle +++ b/LaraUtils/build.gradle @@ -23,10 +23,9 @@ dependencies { // Testing dependencies testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' - testImplementation 'org.mockito:mockito-core:5.5.0' - testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0' + testImplementation 'org.mockito:mockito-core:5.23.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.23.0' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' // For static mocking testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0' } diff --git a/WeaverGen2/build.gradle b/WeaverGen2/build.gradle index da8a5e189..a8503051e 100644 --- a/WeaverGen2/build.gradle +++ b/WeaverGen2/build.gradle @@ -25,10 +25,9 @@ dependencies { // Testing dependencies testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' - testImplementation 'org.mockito:mockito-core:5.5.0' - testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0' + testImplementation 'org.mockito:mockito-core:5.23.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.23.0' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' // For static mocking testImplementation 'org.junit-pioneer:junit-pioneer:2.3.0' // For test retries testImplementation 'com.github.stefanbirkner:system-lambda:1.2.1' testImplementation 'com.google.guava:guava:33.4.0-jre' diff --git a/WeaverInterface/build.gradle b/WeaverInterface/build.gradle index 5dd2b2351..33ff66062 100644 --- a/WeaverInterface/build.gradle +++ b/WeaverInterface/build.gradle @@ -66,10 +66,9 @@ dependencies { // Testing dependencies testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' - testImplementation 'org.mockito:mockito-core:5.5.0' - testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0' + testImplementation 'org.mockito:mockito-core:5.23.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.23.0' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' // For static mocking testImplementation 'org.junit-pioneer:junit-pioneer:2.3.0' // For test retries testImplementation 'com.github.stefanbirkner:system-lambda:1.2.1' testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0'