Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions compiler/src/tests/targets/test_nakama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import { createHash } from "crypto";
import * as path from "path";
import * as fs from "fs";
import { Lexer } from "../lexer";
import { Parser } from "../parser";
import { TypeChecker } from "../typechecker";
import { Lowering } from "../lowering";
import { NakamaEmitter } from "../emit_nakama";
import { FullEmitter } from "../emit_full";
import { Lexer } from "../../lexer";
import { Parser } from "../../parser";
import { TypeChecker } from "../../typechecker";
import { Lowering } from "../../lowering";
import { NakamaEmitter } from "../../emit_nakama";
import { FullEmitter } from "../../emit_full";

// ─── Test harness ─────────────────────────────────────────────────────────────

Expand Down Expand Up @@ -114,7 +114,7 @@ system Arena {
`;

const INVENTORY_EXAMPLE = fs.readFileSync(
path.resolve(__dirname, "../../examples/inventory_platform.marrow"), "utf-8"
path.resolve(__dirname, "../../../../examples/inventory_platform.marrow"), "utf-8"
);

// ─── Test 1: Required files are emitted ───────────────────────────────────────
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/tests/targets/test_notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* - sendWebhook posts to NOTIFY_WEBHOOK_URL with the right shape
*/

import { emitNotifyService } from "../emit_notify";
import * as IR from "../ir";
import { emitNotifyService } from "../../emit_notify";
import * as IR from "../../ir";
import * as http from "http";
import * as fs from "fs";
import * as path from "path";
Expand Down
8 changes: 4 additions & 4 deletions compiler/src/tests/targets/test_prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import { execSync } from "child_process";
import { Lexer } from "../lexer";
import { Parser } from "../parser";
import { Lowering } from "../lowering";
import { PrismaEmitter } from "../emit_prisma";
import { Lexer } from "../../lexer";
import { Parser } from "../../parser";
import { Lowering } from "../../lowering";
import { PrismaEmitter } from "../../emit_prisma";
import { createHash } from "crypto";

let passed = 0;
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/tests/targets/test_react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import { execSync } from "child_process";
import { emitReactHooks } from "../emit_react";
import * as IR from "../ir";
import { emitReactHooks } from "../../emit_react";
import * as IR from "../../ir";

let passed = 0;
let failed = 0;
Expand Down
12 changes: 6 additions & 6 deletions compiler/src/tests/targets/test_sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import * as path from "path";
import * as os from "os";
import { execSync } from "child_process";
import { createHash } from "crypto";
import { Lexer } from "../lexer";
import { Parser } from "../parser";
import { Lowering } from "../lowering";
import { SqliteEmitter } from "../emit_sqlite";
import { Lexer } from "../../lexer";
import { Parser } from "../../parser";
import { Lowering } from "../../lowering";
import { SqliteEmitter } from "../../emit_sqlite";

const SAMPLE = `
system TestStore {
Expand Down Expand Up @@ -76,14 +76,14 @@ function run(): void {
// 3. Run migrations against an actual sqlite db
// We do this by directly using better-sqlite3 from the compiler's node_modules
// (it's already a transitive dep of ts-node tooling) — install only if missing.
const compilerNodeModules = path.resolve(__dirname, "..", "node_modules");
const compilerNodeModules = path.resolve(__dirname, "..", "..", "..", "node_modules");
const sqliteModule = path.join(compilerNodeModules, "better-sqlite3");

if (!fs.existsSync(sqliteModule)) {
console.log("\n (installing better-sqlite3 — first run only)");
try {
execSync("npm install better-sqlite3@11.5.0 --no-save", {
cwd: path.resolve(__dirname, ".."),
cwd: path.resolve(__dirname, "..", "..", ".."),
stdio: "pipe",
});
} catch (e) {
Expand Down
12 changes: 6 additions & 6 deletions compiler/src/tests/targets/test_sqlite_e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import { execSync, spawn, ChildProcess } from "child_process";
import { Lexer } from "../lexer";
import { Parser } from "../parser";
import { Lowering } from "../lowering";
import { ConstraintSolver } from "../solver";
import { optimize } from "../optimizer";
import { SqliteEmitter } from "../emit_sqlite";
import { Lexer } from "../../lexer";
import { Parser } from "../../parser";
import { Lowering } from "../../lowering";
import { ConstraintSolver } from "../../solver";
import { optimize } from "../../optimizer";
import { SqliteEmitter } from "../../emit_sqlite";
import { createHash } from "crypto";

let passed = 0;
Expand Down