From 6253ac15e4b3f15eb129aef20ac28d2e88eb3b39 Mon Sep 17 00:00:00 2001 From: Jared Ramirez Date: Sun, 25 Oct 2020 12:11:23 -0700 Subject: [PATCH] Use differnt atan test based on os --- compiler/gen/tests/gen_num.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler/gen/tests/gen_num.rs b/compiler/gen/tests/gen_num.rs index ffe203c30e..be3a86d3ff 100644 --- a/compiler/gen/tests/gen_num.rs +++ b/compiler/gen/tests/gen_num.rs @@ -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() {