Use differnt atan test based on os

This commit is contained in:
Jared Ramirez 2020-10-25 12:11:23 -07:00
parent 21d4f8026e
commit 6253ac15e4

View file

@ -686,11 +686,19 @@ mod gen_num {
assert_evals_to!("Num.powInt 2 3", 8, i64);
}
// For some reason, libm's atan has slightly different results on macos vs non-macos
#[test]
fn atan() {
#[cfg(target_os = "macos")]
fn atan_macos() {
assert_evals_to!("Num.atan 10", 1.4711276743037345, f64);
}
#[test]
#[cfg(not(target_os = "macos"))]
fn atan() {
assert_evals_to!("Num.atan 10", 1.4711276743037347, f64);
}
// #[test]
// #[should_panic(expected = r#"Roc failed with message: "integer addition overflowed!"#)]
// fn int_overflow() {