Initial import of libdpf.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 14:08:32 -06:00
commit e4e666f459
4563 changed files with 1690372 additions and 0 deletions

View 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));
}