Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: repl & jit test #426

Merged
merged 8 commits into from
Jul 17, 2024
Merged
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: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@
"cwd": "${workspaceFolder}",
"environment": [],
},
{
"name": "(Windows) Launch JIT",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/target/debug/plc.exe",
"args": ["run", "out.ll"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"symbolSearchPath": "${workspaceFolder}\\target\\debug",
"environment": [{"name" : "PATH", "value" : "${workspaceFolder}\\target\\debug;${env:PATH}"},{
"name": "PL_ROOT",
"value": "${workspaceFolder}\\target\\debug"
}],
},
{
"name": "(Windows) 附加",
"type": "cppvsdbg",
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ mdbook-install:
@cargo install mdbook-linkcheck
@cargo install mdbook-toc

init-submodules:
@git submodule update --init --recursive

2 changes: 1 addition & 1 deletion immix
6 changes: 4 additions & 2 deletions src/ast/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,11 @@ fn test_doc_symbol() {
);
}

// FIXME: IDK why but win will fail the test(invalid memory access)
// after Rust print out test succ..
// Can't reproduce on my local machine
#[test]
#[ignore]
#[cfg(feature = "jit")]
#[cfg(all(feature = "jit", not(windows)))]
fn test_orc_jit() {
use crate::ast::compiler::{compile, Options};
use std::path::PathBuf;
Expand Down
5 changes: 3 additions & 2 deletions src/repl/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ struct TestEditor {
err_expects: VecDeque<bool>,
}

#[cfg(target_os = "linux")]
impl TestEditor {
fn new(input: VecDeque<String>, err_expects: VecDeque<bool>) -> Self {
Self { input, err_expects }
Expand Down Expand Up @@ -57,8 +58,8 @@ impl super::editor::TermEditor for TestEditor {
}
}

#[ignore]
#[test]
#[cfg(all(test, target_os = "linux"))]
fn test_repl() {
let rl = TestEditor::new(
VecDeque::from(vec![
Expand All @@ -81,7 +82,7 @@ fn test_repl() {
"@repl symbol".to_owned(),
]),
VecDeque::from(vec![
false, false, true, true, false, false, false, false, false, false, false, false,
false, false, true, false, false, false, false, false, false, false, false, false,
false, false, false, false, false,
]),
);
Expand Down
Loading