21 #include "gtest/gtest.h" 30 TEST(TestRFIDCard, convert_to_int)
33 ASSERT_EQ(4294967295, c1.
to_int());
36 ASSERT_EQ(2864434397, c2.to_int());
39 ASSERT_EQ(961266952, c3.to_int());
42 ASSERT_EQ(1, c4.to_int());
45 ASSERT_EQ(16, c5.to_int());
48 TEST(TestRFIDCard, wiegand_26)
51 ASSERT_EQ(103, c1.
to_int());
54 ASSERT_EQ(102, c2.to_int());
57 ASSERT_EQ(128, c3.to_int());
60 ASSERT_EQ(130, c4.to_int());
62 ASSERT_EQ(33685765, c4.to_raw_int());
65 ASSERT_EQ(131, c5.to_int());
68 ASSERT_EQ(134, c6.to_int());
76 TEST(TestRFIDCard, bits_56)
79 ASSERT_EQ(4294967295, c1.
to_int());
83 ASSERT_EQ(2864434397, c2.to_int());
86 ASSERT_EQ(961266952, c3.to_int());
87 ASSERT_EQ(961266952, c3.to_raw_int());
90 ASSERT_EQ(1, c4.to_int());
93 ASSERT_EQ(16, c5.to_int());
virtual uint64_t to_int() const override
Returns the integer representation of the card ID.
This is the header file for a generated source file, GitSHA1.cpp.
TEST(TestRFIDCard, bits_56)
Test when the reader returns 56 bits (7 bytes).
virtual uint64_t to_raw_int() const override
Convert the bits of the card to an integer.