added attotime test for balrog (nw)

This commit is contained in:
Miodrag Milanovic 2016-03-18 14:00:16 +01:00
parent e446d56daa
commit 45f20a43c7
2 changed files with 12 additions and 0 deletions

View file

@ -70,11 +70,13 @@ project("tests")
includedirs {
MAME_DIR .. "3rdparty/googletest/googletest/include",
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
MAME_DIR .. "src/lib/util",
}
files {
MAME_DIR .. "tests/main.cpp",
MAME_DIR .. "tests/lib/util/corestr.cpp",
MAME_DIR .. "tests/emu/attotime.cpp",
}

10
tests/emu/attotime.cpp Normal file
View file

@ -0,0 +1,10 @@
#include "gtest/gtest.h"
#include "emucore.h"
#include "eminline.h"
#include "attotime.h"
TEST(attotime,as_attoseconds)
{
attotime value = attotime::from_seconds(1);
EXPECT_EQ(1000000000000000000, value.as_attoseconds());
}