Emulator+Test: Add main and example unit test
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "ruc/timer.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
ruc::Timer t;
|
||||
|
||||
printf("%fms\n", t.elapsedNanoseconds() / 1000000.0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user