source-academy / java-slang

Implementation of the Java language in TypeScript
Apache License 2.0
0 stars 0 forks source link

Add JVM specs + static field bug fix #28

Closed Chang-CH closed 3 months ago

Chang-CH commented 3 months ago

Branched from publish-ci, most changes are from the branch.

github-actions[bot] commented 3 months ago

Coverage report

[!CAUTION] Test run failed

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements
75.7% (-0.01% 🔻)
5880/7767
🟡 Branches
65.58% (+0.65% 🔼)
1932/2946
🟡 Functions
75.19% (-0.32% 🔻)
1003/1334
🟡 Lines
75.46% (+0.03% 🔼)
5623/7452
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟡 |
`...` / test-utils.ts
| 75.63% | 74.26% | 69.05% | 75.95% |
Show files with reduced coverage 🔻
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟡 | jvm/utils/index.ts |
69.23% (-0.05% 🔻)
| 51.61% |
45.83% (-1.99% 🔻)
|
69.13% (-0.05% 🔻)
| | 🔴 |
`...` / Object.ts
|
46.75% (-0.62% 🔻)
| 30% |
40% (-2.11% 🔻)
|
46.75% (-0.62% 🔻)
| | 🔴 |
`...` / Field.ts
|
53.85% (-0.52% 🔻)
| 55.32% |
60.87% (-2.77% 🔻)
|
53.85% (-0.52% 🔻)
| | 🔴 |
`...` / Method.ts
|
23.2% (-0.19% 🔻)
| 12.15% |
59.38% (-1.92% 🔻)
|
23.29% (-0.19% 🔻)
| | 🟡 | jvm/thread.ts |
62.5% (-0.46% 🔻)
| 62.61% | 67.57% |
62.28% (-0.46% 🔻)
|

Test suite run failed

Failed tests: 71/1026. Failed suites: 2/52.
``` ● Test suite failed to run Your test suite must contain at least one test. at onResult (node_modules/@jest/core/build/TestScheduler.js:133:18) at node_modules/@jest/core/build/TestScheduler.js:254:19 at node_modules/emittery/index.js:363:13 at Array.map () at Emittery.emit (node_modules/emittery/index.js:361:23) ``` --- ``` ● compiler tests › println › println with String argument Command failed: java -noverify Main > output 2> err.log 36 | const prevDir = process.cwd(); 37 | process.chdir(pathToTestDir); > 38 | execSync("java -noverify Main > output 2> err.log"); | ^ 39 | const actualResult = fs.readFileSync("./output", 'utf-8'); 40 | process.chdir(prevDir); 41 | at runTest (src/compiler/__tests__/test-utils.ts:38:11) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with char argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with int argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with float argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with long argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with double argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › println with boolean argument ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › println › multiple println statements ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/println.test.ts:121:30) ● compiler tests › variable declaration › one int variable declaration ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/variableDeclaration.test.ts:100:30) ● compiler tests › variable declaration › multiple int variable declaration ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/variableDeclaration.test.ts:100:30) ● compiler tests › variable declaration › allow same variable name declaration in different for init ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/variableDeclaration.test.ts:100:30) ● compiler tests › variable declaration › allow declaration of same name after out of scope ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/variableDeclaration.test.ts:100:30) ● compiler tests › variable declaration › declaration of primitive types ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/variableDeclaration.test.ts:100:30) ● compiler tests › arithmetic expression › int only simple binary expression, part 1 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/arithmeticExpression.test.ts:87:30) ● compiler tests › arithmetic expression › int only simple binary expression, part 2 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/arithmeticExpression.test.ts:87:30) ● compiler tests › arithmetic expression › int only complex binary expression ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/arithmeticExpression.test.ts:87:30) ● compiler tests › arithmetic expression › int boundaries ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/arithmeticExpression.test.ts:87:30) ● compiler tests › unary expression › postfix increment/decrement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/unaryExpression.test.ts:95:30) ● compiler tests › unary expression › prefix increment/decrement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/unaryExpression.test.ts:95:30) ● compiler tests › unary expression › unary plus/minus ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/unaryExpression.test.ts:95:30) ● compiler tests › unary expression › bitwise complement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/unaryExpression.test.ts:95:30) ● compiler tests › if else statements › if without else ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › if without else, trivial conditional expression ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › if and else ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › else follow innermost if ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › chain of if elses ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › logical and ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › logical or ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › logical not ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › complex conditional expression ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › if else statements › nested if else ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/ifElse.test.ts:277:30) ● compiler tests › while statements › while loops ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › 2 level nested while loops ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › 3 level nested while loops ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › while with if else (simple Collatz sequence) ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › do while ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › while with break statement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › while with continue statement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › while statements › do while, with continue ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/while.test.ts:161:30) ● compiler tests › for statements › basic for loop ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loop without init ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loop without update ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loop with if ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › 2 level nested for loops, part 1 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › 2 level nested for loops, part 2 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loops with break statement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loops with continue statement ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › for statements › for loops with break/continue statements ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/for.test.ts:167:30) ● compiler tests › method invocations › multiple class methods ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › recursive method ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › chain calls ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › static function returning non-void ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › factorial function on small input ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › composite function ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › method invocations › multi-argument function ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/methodInvocation.test.ts:161:30) ● compiler tests › imports › default import java.lang.*, part 1 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/import.test.ts:52:30) ● compiler tests › imports › default import java.lang.*, part 2 ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/import.test.ts:52:30) ● compiler tests › imports › default import java.lang.Math ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/import.test.ts:52:30) ● compiler tests › arrays › array creation ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/array.test.ts:94:30) ● compiler tests › arrays › array accesses ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/array.test.ts:94:30) ● compiler tests › arrays › array length ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/array.test.ts:94:30) ● compiler tests › arrays › array manipulation ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/array.test.ts:94:30) ● compiler tests › arrays › sum of two arrays ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/array.test.ts:94:30) ● compiler tests › fields and methods of class › static field ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › static field, simple name ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › allow declaration of same name for field and method ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › instance creation, default constructor ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › instance creation, custom constructor ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › instance method ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › instance field ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ● compiler tests › fields and methods of class › instance field and method ENOENT: no such file or directory, open './src/compiler/__tests__/Main.class' 44 | const filename = filepath + "Main.class"; 45 | const binary = this.toBinary(classFile); > 46 | fs.writeFileSync(filename, binary); | ^ 47 | } 48 | 49 | private toBinary(classFile: ClassFile) { at BinaryWriter.writeFileSync [as writeBinary] (src/compiler/binary-writer.ts:46:8) at runTest (src/compiler/__tests__/test-utils.ts:34:16) at Object. (src/compiler/__tests__/tests/class.test.ts:153:30) ```

Report generated by 🧪jest coverage report action from b234fad31b17673ee4a246f81b081772e5b66231