summaryrefslogtreecommitdiff
path: root/AK/Tests
diff options
context:
space:
mode:
authorMichel Hermier <michel.hermier@gmail.com>2021-03-27 22:12:07 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-28 11:45:51 +0200
commit4f1c72c174c247f2d3c26c227ddd62bf6c0bf76c (patch)
treed51cf0fa37d683bc7e678082ddf4c726a3743f00 /AK/Tests
parentd77cbc0fa89a2d0efeb213b3c200bf7e7e5d2cb1 (diff)
downloadserenity-4f1c72c174c247f2d3c26c227ddd62bf6c0bf76c.zip
AK: Add IsSigned conterpart to IsUnsigned.
Diffstat (limited to 'AK/Tests')
-rw-r--r--AK/Tests/TestTypeTraits.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/AK/Tests/TestTypeTraits.cpp b/AK/Tests/TestTypeTraits.cpp
index 2e1dbde4c5..1b13d71903 100644
--- a/AK/Tests/TestTypeTraits.cpp
+++ b/AK/Tests/TestTypeTraits.cpp
@@ -85,6 +85,14 @@ TEST_CASE(FundamentalTypeClassification)
EXPECT_TRAIT_FALSE(IsFundamental, Empty, int*, int&);
+ EXPECT_TRAIT_FALSE(IsSigned, unsigned);
+ EXPECT_TRAIT_FALSE(IsSigned, unsigned short);
+ EXPECT_TRAIT_FALSE(IsSigned, unsigned char);
+ EXPECT_TRAIT_FALSE(IsSigned, unsigned long);
+ EXPECT_TRAIT_TRUE(IsSigned, int);
+ EXPECT_TRAIT_TRUE(IsSigned, short);
+ EXPECT_TRAIT_TRUE(IsSigned, long);
+
EXPECT_TRAIT_TRUE(IsUnsigned, unsigned);
EXPECT_TRAIT_TRUE(IsUnsigned, unsigned short);
EXPECT_TRAIT_TRUE(IsUnsigned, unsigned char);