mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
handle all comparison widths
This commit is contained in:
parent
9dd69f6f9c
commit
fdffcc8b36
5 changed files with 283 additions and 110 deletions
|
@ -15,6 +15,40 @@ use indoc::indoc;
|
|||
#[allow(unused_imports)]
|
||||
use roc_std::{RocList, RocResult, RocStr};
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn string_eq() {
|
||||
// context: the dev backend did not correctly mask the boolean that zig returns here
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
main : I64
|
||||
main = if "*" == "*" then 123 else 456
|
||||
"#
|
||||
),
|
||||
123,
|
||||
u64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn string_neq() {
|
||||
// context: the dev backend did not correctly mask the boolean that zig returns here
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
main : I64
|
||||
main = if "*" != "*" then 123 else 456
|
||||
"#
|
||||
),
|
||||
456,
|
||||
u64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))]
|
||||
fn str_split_empty_delimiter() {
|
||||
|
|
|
@ -210,7 +210,7 @@ pub fn helper(
|
|||
let builtins_host_tempfile =
|
||||
roc_bitcode::host_tempfile().expect("failed to write host builtins object to tempfile");
|
||||
|
||||
if false {
|
||||
if true {
|
||||
std::fs::copy(&app_o_file, "/tmp/app.o").unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue