Skip to content

Commit 71b3a5d

Browse files
authored
Merge pull request #805 from SchoolyB/fix/pr-792-cleanup
chore: add integration tests and update `.gitignore`
2 parents 0ddb702 + 6500e6c commit 71b3a5d

17 files changed

+232
-4
lines changed

.gitignore

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,62 @@
1+
# Binaries and compiled files
12
*.bin
3+
*.exe
4+
*.so
5+
*.dll
6+
*.dylib
7+
*.o
8+
*.a
29
/ez
10+
11+
# Build directories
312
dist/
4-
context
5-
*.txt
6-
tmp/
13+
bin/
14+
build/
15+
out/
16+
17+
# Coverage and profiling
18+
*.out
19+
*.html
20+
*.prof
21+
*.test
22+
23+
# IDE and editors
24+
.idea/
25+
.vscode/
26+
*.swp
27+
*.swo
28+
*~
29+
.project
30+
.settings/
31+
*.sublime-project
32+
*.sublime-workspace
33+
34+
# OS files
735
.DS_Store
36+
Thumbs.db
37+
38+
# Temp and logs
39+
tmp/
40+
*.log
41+
*.tmp
42+
43+
# Environment and secrets
44+
.env
45+
.env.*
46+
*.pem
47+
*.key
48+
49+
# Project specific
50+
context/
51+
*.txt
52+
*.ezdb
53+
54+
# Ignore JSON files except examples/json/data.json
55+
*.json
56+
!examples/json/data.json
857

958
# Ignore all .ez files by default (for local scratch/testing)
1059
*.ez
11-
coverage.out
1260

1361
# Keep tests and examples tracked
1462
!integration-tests/
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Error Test: E1017 - unclosed-raw-string
3+
* Expected: "unclosed raw string literal"
4+
*/
5+
6+
do main() {
7+
temp s string = `this raw string never ends
8+
}
9+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Error Test: E2010 - using-before-import
3+
* Expected: "cannot use module before importing"
4+
*/
5+
6+
using math // using before import
7+
8+
import @math
9+
10+
do main() {
11+
println("test")
12+
}
13+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Error Test: E2027 - integer-parse-error
3+
* Expected: "cannot parse" or "parse" or "integer"
4+
*/
5+
6+
do main() {
7+
temp x int = 0xGG // invalid hex integer
8+
}
9+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Error Test: E2044 - when-float-not-allowed
3+
* Expected: "float type not allowed in when statement"
4+
*/
5+
6+
do main() {
7+
temp x float = 3.14
8+
when x {
9+
is 1.0 { println("one") }
10+
is 2.0 { println("two") }
11+
default { println("other") }
12+
}
13+
}
14+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Error Test: E2053 - type-definition-in-function
3+
* Expected: "type definitions must be at file level"
4+
*/
5+
6+
do main() {
7+
struct Person { // type definition inside function
8+
name string
9+
}
10+
temp p Person = Person{name: "Alice"}
11+
}
12+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Error Test: E3029 - float-enum-map-key
3+
* Expected: "float-based enum cannot be used as map key"
4+
*/
5+
6+
enum Status [float] {
7+
ACTIVE = 1.0,
8+
INACTIVE = 2.0
9+
}
10+
11+
do main() {
12+
temp m map[Status: string] = {} // float enum as map key
13+
}
14+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Error Test: E3034 - any-type-not-allowed
3+
* Expected: "'any' type is reserved for internal use"
4+
*/
5+
6+
do main() {
7+
temp x any = 42 // 'any' type is reserved
8+
}
9+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Error Test: E4005 - undefined-module-member
3+
* Expected: "not found in module"
4+
*/
5+
6+
import @math
7+
8+
do main() {
9+
temp x int = math.nonexistent_function() // Function doesn't exist
10+
}
11+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Error Test: E4007 - module-not-imported
3+
* Expected: "module not imported"
4+
*/
5+
6+
do main() {
7+
temp x int = math.abs(-5) // Using math without importing
8+
}
9+

0 commit comments

Comments
 (0)