Browse Source

Emulator+Test: Add main and example unit test

master
Riyyi 2 years ago
parent
commit
c5d5ffc1eb
  1. 12
      src/main.cpp
  2. 17
      test/testthing.cpp

12
src/main.cpp

@ -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;
}

17
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);
}
Loading…
Cancel
Save