mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
53 lines
542 B
Rust
53 lines
542 B
Rust
mod common;
|
|
use crate::common::_run_test;
|
|
|
|
run_test!(
|
|
single_if,
|
|
r#"
|
|
if true {
|
|
print "true!";
|
|
}
|
|
|
|
if false {
|
|
print "WRONG";
|
|
}
|
|
"#
|
|
);
|
|
|
|
run_test!(
|
|
if_else,
|
|
r#"
|
|
if true {
|
|
print "true!";
|
|
} else {
|
|
print "WRONG";
|
|
}
|
|
|
|
if false {
|
|
print "WRONG";
|
|
} else {
|
|
print "true!";
|
|
}
|
|
"#
|
|
);
|
|
|
|
run_test!(
|
|
if_else_if,
|
|
r#"
|
|
if false {
|
|
print "WRONG";
|
|
} else if true {
|
|
print "true!";
|
|
} else {
|
|
print "WRONG";
|
|
}
|
|
|
|
if false {
|
|
print "WRONG";
|
|
} else if false {
|
|
print "WRONG";
|
|
} else {
|
|
print "true!";
|
|
}
|
|
"#
|
|
);
|