New structure allows better modularization of unit tests.
[Verification] webapi_common_tests are built successfully and pass.
Signed-off-by: Michal Michalski <m.michalski2@partner.samsung.com>
Change-Id: Icad5cca7739716bde7c09092f4d1d73fca1972a0
# tizen ut mobile
%if "%{?tizen_ut_build}" == "1"
mkdir -p %{buildroot}/usr/bin
-install -p -m 755 out/bin_mobile/bundle_ut %{buildroot}/usr/bin/
+install -p -m 755 out/bin_mobile/webapi_common_tests %{buildroot}/usr/bin/
%endif
install -p -m 644 out/bin_mobile/libtizen*.so %{buildroot}%{crosswalk_extensions_path}/mobile
# UT files
%if "%{?tizen_ut_build}" == "1"
%license GTEST.BSD-3-Clause
-/usr/bin/bundle_ut
+/usr/bin/webapi_common_tests
%endif
# mobile-extension-emulator
],
'targets': [
{
- 'target_name': 'bundle_ut',
+ 'target_name': 'webapi_common_tests',
'type': 'executable',
'dependencies': [
'common.gyp:tizen_common'
'../googletest/src/gtest-all.cc',
'../googlemock/src/gmock-all.cc',
'ut/common_ut_extension.cc',
- 'ut/bundle_ut.cc'
+ 'ut/json-utils.cc',
+ 'ut/main.cc'
],
'libraries': [
'-lbundle',
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "tizen.h"
-
#include "gmock/gmock.h"
#include "gtest/gtest.h"
+#include "common/ut/json-utils.h"
+
#include "bundle.h"
#include "bundle_internal.h"
#include "common/json-utils.h"
EXPECT_EQ(bytes[2].get<double>(), value[1][2]);
}
-int main(int argc, char* argv[]) {
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef COMMON_UT_JSON_UTILS_H
+#define COMMON_UT_JSON_UTILS_H
+
+class JsonToBundleTest;
+class BundleToJsonTest;
+
+#endif // COMMON_UT_JSON_UTILS_H
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gtest/gtest.h"
+
+#include "common/ut/json-utils.h"
+
+#include "tizen.h"
+
+int main(int argc, char* argv[]) {
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
+