Issues with current model during copy / move operations in MODELSEL menu.

This commit is contained in:
bsongis
2011-11-25 11:04:38 +00:00
parent 5d9a2a483b
commit 9761da9de3
12 changed files with 576 additions and 556 deletions
+9 -2
View File
@@ -140,7 +140,7 @@ TEST(EEPROM, eeCheckImmediately) {
EXPECT_EQ(sz, 300);
}
TEST(EEPROM, eeDuplicateModel) {
TEST(EEPROM, copy) {
eepromFile = NULL; // in memory
uint8_t buf[1000];
@@ -151,7 +151,7 @@ TEST(EEPROM, eeDuplicateModel) {
theFile.writeRlc(5, 6, buf, 300, true);
eeDuplicateModel(4);
theFile.copy(6, 5);
theFile.openRd(6);
uint16_t sz=0;
@@ -250,6 +250,13 @@ TEST(getSwitch, circularCSW) {
EXPECT_EQ(getSwitch(-(1+MAX_SWITCH-NUM_CSW), 0), true);
}
TEST(getSwitch, nullSW) {
memset(&g_model, 0, sizeof(g_model));
EXPECT_EQ(getSwitch(0, 0), false);
EXPECT_EQ(getSwitch(0, true), true);
EXPECT_EQ(getSwitch(0, 0), false);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();