void KeyMapTest::test() { IUNIT_FALSE(KeyCode::KEY_UP_ARROW == KeyCode::KEY_DOWN_ARROW); IUNIT_NOT_NULL(keyMap.getKeyEntry(1)); IUNIT_NULL(keyMap.getKeyEntry(2)); const KeySequenceEntry* entry = keyMap.getKeyEntry(1); IUNIT_EQ(true, entry->isEntry()); entry = keyMap.getKeyEntry(27); IUNIT_EQ(false, entry->isEntry()); entry = entry->getKeySequenceEntry(91); IUNIT_NOT_NULL( entry ); IUNIT_EQ(false, entry->isEntry()); const KeySequenceEntry* tmp = entry->getKeySequenceEntry(65); IUNIT_NOT_NULL( tmp ); IUNIT_EQ(true, tmp->isEntry()); tmp = entry->getKeySequenceEntry(66); IUNIT_NOT_NULL( tmp ); IUNIT_EQ(true, tmp->isEntry()); keyMap.deleteKeyCodeSeq(KeyCode::KEY_CTRL_A); IUNIT_NOT_NULL(keyMap.getKeyEntry(27)); IUNIT_NULL(keyMap.getKeyEntry(1)); }
virtual void teardown() { keyMap.deleteKeyCodeSeq(KeyCode::KEY_UP_ARROW); keyMap.deleteKeyCodeSeq(KeyCode::KEY_CTRL_A); }