• Home
  • Raw
  • Download

Lines Matching refs:WeaverTest

24 class WeaverTest: public testing::Test {  class
61 std::random_device WeaverTest::random_number_generator;
65 uint32_t WeaverTest::slot = WeaverTest::random_number_generator() & SLOT_MASK;
67 unique_ptr<nos::NuggetClientInterface> WeaverTest::client;
68 unique_ptr<test_harness::TestHarness> WeaverTest::uart_printer;
70 void WeaverTest::SetUpTestCase() { in SetUpTestCase()
78 void WeaverTest::TearDownTestCase() { in TearDownTestCase()
85 void WeaverTest::testWrite(const string& msg, uint32_t slot, const uint8_t *key, in testWrite()
97 void WeaverTest::testRead(const string& msg, uint32_t slot, const uint8_t *key, in testRead()
115 void WeaverTest::testEraseValue(const string& msg, uint32_t slot) { in testEraseValue()
124 void WeaverTest::testReadWrongKey(const string& msg, uint32_t slot, in testReadWrongKey()
142 void WeaverTest::testReadThrottle(const string& msg, uint32_t slot, in testReadThrottle()
161 void WeaverTest::activateThrottle(uint32_t slot, const uint8_t *key, in activateThrottle()
175 TEST_F(WeaverTest, GetConfig) { in TEST_F() argument
186 TEST_F(WeaverTest, WriteReadErase) { in TEST_F() argument
189 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
190 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
191 testEraseValue(__STAMP__, WeaverTest::slot); in TEST_F()
193 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, ZERO_VALUE); in TEST_F()
197 TEST_F(WeaverTest, WriteToMultipleSlotsInSameRecordIncreasingOrder) { in TEST_F() argument
205 TEST_F(WeaverTest, WriteToMultipleSlotsInSameRecordDecreasingOrder) { in TEST_F() argument
213 TEST_F(WeaverTest, WriteToMultipleSlotsInDifferentRecordsIncreasingOrder) { in TEST_F() argument
221 TEST_F(WeaverTest, WriteToMultipleSlotsInDifferentRecordsDecreasingOrder) { in TEST_F() argument
229 TEST_F(WeaverTest, WriteDeepSleepRead) { in TEST_F() argument
230 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
232 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
235 TEST_F(WeaverTest, WriteHardRebootRead) { in TEST_F() argument
236 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
238 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
241 TEST_F(WeaverTest, ReadThrottle) { in TEST_F() argument
242 activateThrottle(WeaverTest::slot, TEST_KEY, WRONG_KEY, 30); in TEST_F()
243 testReadThrottle(__STAMP__, WeaverTest::slot, WRONG_KEY, 30); in TEST_F()
246 TEST_F(WeaverTest, ReadThrottleAfterDeepSleep) { in TEST_F() argument
247 activateThrottle(WeaverTest::slot, TEST_KEY, WRONG_KEY, 30); in TEST_F()
249 testReadThrottle(__STAMP__, WeaverTest::slot, WRONG_KEY, 30); in TEST_F()
252 TEST_F(WeaverTest, ReadThrottleAfterHardReboot) { in TEST_F() argument
253 activateThrottle(WeaverTest::slot, TEST_KEY, WRONG_KEY, 30); in TEST_F()
255 testReadThrottle(__STAMP__, WeaverTest::slot, WRONG_KEY, 30); in TEST_F()
258 TEST_F(WeaverTest, ReadThrottleAfterSleep) { in TEST_F() argument
260 activateThrottle(WeaverTest::slot, TEST_KEY, WRONG_KEY, 30); in TEST_F()
262 testReadThrottle(__STAMP__, WeaverTest::slot, WRONG_KEY, 30 - waited); in TEST_F()
265 TEST_F(WeaverTest, ReadAttemptCounterPersistsDeepSleep) { in TEST_F() argument
266 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
268 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
269 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
270 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
274 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
275 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 30); in TEST_F()
278 TEST_F(WeaverTest, ReadAttemptCounterPersistsHardReboot) { in TEST_F() argument
279 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
281 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
282 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
286 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
287 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 0); in TEST_F()
288 testReadWrongKey(__STAMP__, WeaverTest::slot, WRONG_KEY, 30); in TEST_F()
291 TEST_F(WeaverTest, ReadInvalidSlot) { in TEST_F() argument
300 TEST_F(WeaverTest, WriteInvalidSlot) { in TEST_F() argument
310 TEST_F(WeaverTest, EraseValueInvalidSlot) { in TEST_F() argument
318 TEST_F(WeaverTest, WipeUserDataOnlyClearsValues) { in TEST_F() argument
319 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
321 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, ZERO_VALUE); in TEST_F()
324 TEST_F(WeaverTest, ProductionResetWipesUserData) { in TEST_F() argument
326 testWrite(__STAMP__, WeaverTest::slot, TEST_KEY, TEST_VALUE); in TEST_F()
328 testRead(__STAMP__, WeaverTest::slot, TEST_KEY, ZERO_VALUE); in TEST_F()
332 TEST_F(WeaverTest, WipeUserDataWriteSlot0ReadSlot1) { in TEST_F() argument