projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fdd0c0
)
[APInt] Fix a bug in the unit testing introduced in 55968109d
author
Peter Rong
<PeterRong96@gmail.com>
Thu, 15 Dec 2022 18:51:33 +0000
(10:51 -0800)
committer
Peter Rong
<PeterRong96@gmail.com>
Thu, 15 Dec 2022 18:51:33 +0000
(10:51 -0800)
Signed-off-by: Peter Rong <PeterRong96@gmail.com>
llvm/unittests/ADT/APIntTest.cpp
patch
|
blob
|
history
diff --git
a/llvm/unittests/ADT/APIntTest.cpp
b/llvm/unittests/ADT/APIntTest.cpp
index
09c9c8d
..
e7632c0
100644
(file)
--- a/
llvm/unittests/ADT/APIntTest.cpp
+++ b/
llvm/unittests/ADT/APIntTest.cpp
@@
-3152,7
+3152,8
@@
TEST(APIntTest, TryExt) {
ASSERT_EQ(negOne64.trySExtValue().value_or(42), -1);
APInt negOne128(128, 0);
negOne128.setAllBits();
- ASSERT_EQ(negOne128.trySExtValue().value_or(42), 42);
+ ASSERT_EQ(negOne128.trySExtValue().value_or(42), -1);
+ ASSERT_EQ(42, APInt(128, -1).trySExtValue().value_or(42));
}
} // end anonymous namespace