From c5d5ffc1eb97e352f893efaf47da90ae470e0107 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 17 Aug 2022 18:20:11 +0200 Subject: [PATCH] Emulator+Test: Add main and example unit test --- src/main.cpp | 12 ++++++++++++ test/testthing.cpp | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/main.cpp create mode 100644 test/testthing.cpp diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..3c59f96 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,12 @@ +#include + +#include "ruc/timer.h" + +int main(int argc, char* argv[]) +{ + ruc::Timer t; + + printf("%fms\n", t.elapsedNanoseconds() / 1000000.0); + + return 0; +} diff --git a/test/testthing.cpp b/test/testthing.cpp new file mode 100644 index 0000000..3e71310 --- /dev/null +++ b/test/testthing.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2022 Riyyi + * + * SPDX-License-Identifier: MIT + */ + +#include "macro.h" +#include "testcase.h" +#include "testsuite.h" + +// ----------------------------------------- + +TEST_CASE(Thing) +{ + int a = 5; + EXPECT_EQ(a, 5); +}