6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <quiz.h>
#include <ion.h>
#include <assert.h>
using namespace Ion::Keyboard;
using namespace Ion::Events;
QUIZ_CASE(ion_events_from_keyboard) {
/* Ensure all events generated from the keyboard are properly defined */
for (Key k : ValidKeys) {
assert(Event(k, false, false).isDefined());
assert(Event(k, true, false).isDefined());
assert(Event(k, false, true).isDefined());
assert(Event(k, true, true).isDefined());
}
// Test some fallbacks
assert(Event(Key::I5, false, false) == EXE);
assert(Event(Key::I5, true, false) == EXE);
assert(Event(Key::I5, false, true) == EXE);
assert(Event(Key::I5, true, true) == EXE);
}
|