summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Core/ScalarTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/Core/ScalarTest.cpp')
-rw-r--r--lldb/unittests/Core/ScalarTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/unittests/Core/ScalarTest.cpp b/lldb/unittests/Core/ScalarTest.cpp
index fedcd195e4a..47fa0215ead 100644
--- a/lldb/unittests/Core/ScalarTest.cpp
+++ b/lldb/unittests/Core/ScalarTest.cpp
@@ -132,3 +132,11 @@ TEST(ScalarTest, GetValue) {
EXPECT_EQ(std::to_string(std::numeric_limits<unsigned long long>::max()),
ScalarGetValue(std::numeric_limits<unsigned long long>::max()));
}
+
+TEST(ScalarTest, Division) {
+ Scalar lhs(5.0);
+ Scalar rhs(2.0);
+ Scalar r = lhs / rhs;
+ EXPECT_TRUE(r.IsValid());
+ EXPECT_EQ(r, Scalar(2.5));
+}
OpenPOWER on IntegriCloud