Fix complex.csqrtf test and add a trivial sincosl test.
sincos and sincosf are being tested more thoroughly with a table of data,
but there's nothing equivalent for sincosl.
Test: ran the tests, obviously.
Change-Id: I5b4b22b73cad9b0030549de2e2ed2a0e38648806
diff --git a/tests/math_test.cpp b/tests/math_test.cpp
index c805cc2..6c7dffb 100644
--- a/tests/math_test.cpp
+++ b/tests/math_test.cpp
@@ -385,6 +385,27 @@
ASSERT_DOUBLE_EQ(0.0L, sinl(0.0L));
}
+TEST(math, sincos) {
+ double s, c;
+ sincos(0.0, &s, &c);
+ ASSERT_DOUBLE_EQ(0.0, s);
+ ASSERT_DOUBLE_EQ(1.0, c);
+}
+
+TEST(math, sincosf) {
+ float s, c;
+ sincosf(0.0f, &s, &c);
+ ASSERT_FLOAT_EQ(0.0f, s);
+ ASSERT_FLOAT_EQ(1.0f, c);
+}
+
+TEST(math, sincosl) {
+ long double s, c;
+ sincosl(0.0L, &s, &c);
+ ASSERT_DOUBLE_EQ(0.0L, s);
+ ASSERT_DOUBLE_EQ(1.0L, c);
+}
+
TEST(math, tan) {
ASSERT_DOUBLE_EQ(0.0, tan(0.0));
}