Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
16
thirdparty/uint256_t/tests/testcases/unary.cpp
vendored
Normal file
16
thirdparty/uint256_t/tests/testcases/unary.cpp
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "uint256_t.h"
|
||||
|
||||
TEST(Arithmetic, unary_plus){
|
||||
const uint256_t value(0x12345ULL);
|
||||
EXPECT_EQ(+value, value);
|
||||
}
|
||||
|
||||
TEST(Arithmetic, unary_minus){
|
||||
const uint256_t val(1);
|
||||
const uint256_t neg = -val;
|
||||
EXPECT_EQ(-val, neg);
|
||||
EXPECT_EQ(-neg, val);
|
||||
EXPECT_EQ(neg, uint256_t(0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue