19 lines
491 B
C++
19 lines
491 B
C++
|
#include "../src/internal.hpp"
|
||
|
#include "../src/vkvm.hpp"
|
||
|
#include <catch2/catch.hpp>
|
||
|
|
||
|
|
||
|
TEST_CASE("Keyboard Buffer") {
|
||
|
SECTION("write") {
|
||
|
vkvm::setLogLevel(vkvm::DEBUG);
|
||
|
vkvm::buttonPressed(vkvm::A);
|
||
|
vkvm::buttonPressed(vkvm::B);
|
||
|
vkvm::buttonPressed(vkvm::C);
|
||
|
}
|
||
|
|
||
|
SECTION("read") {
|
||
|
CHECK(vkvm::getLastPressedKey() == vkvm::A);
|
||
|
CHECK(vkvm::getLastPressedKey() == vkvm::B);
|
||
|
CHECK(vkvm::getLastPressedKey() == vkvm::C);
|
||
|
}
|
||
|
}
|