From a452346385e75834708a78de72dcb004278c7d99 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Thu, 20 Aug 2020 14:26:21 +0300 Subject: [PATCH] [Runtime testing] Add example tests --- runtime/src/main/cpp/ArraysTest.cpp | 18 ++++++++++++++++++ runtime/src/test_support/cpp/TestLauncher.cpp | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 runtime/src/main/cpp/ArraysTest.cpp diff --git a/runtime/src/main/cpp/ArraysTest.cpp b/runtime/src/main/cpp/ArraysTest.cpp new file mode 100644 index 00000000000..e4f07ade66b --- /dev/null +++ b/runtime/src/main/cpp/ArraysTest.cpp @@ -0,0 +1,18 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#include "gtest/gtest.h" + +#include "Porting.h" + +TEST(ArraysTest, GoodTest) { + konan::consolePrintf("I'm a good test\n"); + EXPECT_EQ(true, true); +} + +TEST(ArraysTest, BadTest) { + konan::consolePrintf("I'm a bad test\n"); + EXPECT_EQ(true, false); +} diff --git a/runtime/src/test_support/cpp/TestLauncher.cpp b/runtime/src/test_support/cpp/TestLauncher.cpp index 0c411dfdafc..fa2c38e9536 100644 --- a/runtime/src/test_support/cpp/TestLauncher.cpp +++ b/runtime/src/test_support/cpp/TestLauncher.cpp @@ -6,7 +6,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -int main(int argc, char **argv) { +int main(int argc, char** argv) { testing::InitGoogleMock(&argc, argv); return RUN_ALL_TESTS(); }