Skip to content

Commit

Permalink
see #11, see #12
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
andrieshiemstra committed Apr 16, 2021
1 parent 971e1fa commit 4bcd52f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/preprocessors/cpp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,18 @@ mod tests {
#[test]
fn test_ifdef() {
let rt = init_test_greco_rt();
let res = rt.eval_sync(EsScript::new("test.es", "(123);"));
let res = rt.eval_sync(EsScript::new(
"test.es",
"((function(){\n\
#if 'DEBUG' == 'false'\n\
return 111;\n\
#elif 'DEBUG' == 'true'\n\
return 123;\n\
#else\n\
return 222;\n\
#endif\n\
})());",
));
let num = match res {
Ok(e) => e,
Err(err) => {
Expand Down

0 comments on commit 4bcd52f

Please sign in to comment.