-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
364 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,25 @@ jobs: | |
run: sudo apt-get install libc-dev build-essential | ||
- name: test | ||
run: make test | ||
|
||
test-macos: | ||
name: test (macOS) | ||
runs-on: macos-14 | ||
env: | ||
CARGO_TERM_COLOR: always | ||
LIBRARY_PATH: /opt/homebrew/lib | ||
MLIR_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18 | ||
LLVM_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18 | ||
TABLEGEN_180_PREFIX: /opt/homebrew/opt/llvm@18 | ||
RUST_LOG: debug | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Rustup toolchain install | ||
uses: dtolnay/[email protected] | ||
- uses: homebrew/actions/setup-homebrew@master | ||
- name: install llvm | ||
run: brew install llvm@18 | ||
- name: Run tests | ||
run: make test | ||
coverage: | ||
name: coverage | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
crates/concrete_driver/tests/invalid_programs/call_param_count_mismatch.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mod Test { | ||
fn main() -> i32 { | ||
return hello(1, 2); | ||
} | ||
|
||
fn hello(a: i32) -> i32 { | ||
return a * 2; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
crates/concrete_driver/tests/invalid_programs/call_param_type_mismatch.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mod Test { | ||
fn main() -> i32 { | ||
let x: u32 = 1; | ||
return hello(x); | ||
} | ||
|
||
fn hello(a: i32) -> i32 { | ||
return a * 2; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/concrete_driver/tests/invalid_programs/immutable_mutation.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod Simple { | ||
fn main() -> i32 { | ||
let x: i32 = 2; | ||
x = 4; | ||
return x; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
crates/concrete_driver/tests/invalid_programs/invalid_assign.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mod Simple { | ||
fn main() -> i32 { | ||
let mut x: i32 = 2; | ||
let y: i64 = 4; | ||
x = y; | ||
return x; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
..._driver/tests/invalid_programs/refmut.con → ...s/invalid_programs/invalid_borrow_mut.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
mod Simple { | ||
|
||
fn main() -> i32 { | ||
let x: i32 = 1; | ||
let mut x: i32 = 1; | ||
hello(&x); | ||
return x; | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
crates/concrete_driver/tests/invalid_programs/mutable_nonmut_borrow.con
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mod Simple { | ||
fn main() -> i32 { | ||
let x: i32 = 2; | ||
let y: &mut i32 = &mut x; | ||
*y = 4; | ||
return *y; | ||
} | ||
} |
Oops, something went wrong.