From a093d01e6a9b3dd8974a6a6d26706ed73a9c6217 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 26 Oct 2014 01:23:22 +0000 Subject: some small changes to the script engine unit test and the documentation git-svn-id: file:///var/local/svn/basicwriter@80 daaaf23c-2e50-4459-9457-1e69db5a47bf --- CMakeLists.txt | 1 + dependencies.txt | 9 +++++++-- test/plugins/genericjs/GenericJsScriptEngineTest.hpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60fb273..eff2fcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ PROJECT(ousia) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) # Option for enabling testing. Turn on with 'cmake -Dtest=ON'. +# TODO: Automatically activate tests if gtest is available OPTION(test "Build all tests." OFF) # Makes boolean 'test' available. # Option for building the documentation. diff --git a/dependencies.txt b/dependencies.txt index d77be63..4fcc181 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -4,7 +4,12 @@ Hard dependencies The following packages have to be installed (for Fedora) - cmake -- mozjs24-devel +- mozjs24-devel (for the mandatory mozjs plugin) + +Test dependencies +================= + +Tests are based on the gtest library. Run the ./lib/download_dependencies.sh script to fetch this dependency. Documentation ============= @@ -25,7 +30,7 @@ http://llvm.org/releases/download.html use the "clang-format" program in the bin/ directory. The following gedit tool can be used for automated code formating: -(Active "External Tools" plugin, add the following lines to ./config/gedit/tools/, without indentation) +(Activate the "External Tools" plugin, add the following lines to .config/gedit/tools/clang-format, without indentation) #!/bin/sh # [Gedit Tool] diff --git a/test/plugins/genericjs/GenericJsScriptEngineTest.hpp b/test/plugins/genericjs/GenericJsScriptEngineTest.hpp index 8e3ffea..b7f95da 100644 --- a/test/plugins/genericjs/GenericJsScriptEngineTest.hpp +++ b/test/plugins/genericjs/GenericJsScriptEngineTest.hpp @@ -99,7 +99,7 @@ TEST(GENERIC_JS_TEST_NAME, returnObject) { GENERIC_JS_TEST_SCOPE Variant res = scope->run( - "var obj = {\"key1\": 42, \"key2\": \"Hello World\", \"key3\": false}; obj"); + "({\"key1\": 42, \"key2\": \"Hello World\", \"key3\": false})"); ASSERT_EQ(VariantType::map, res.getType()); std::map m = res.getMapValue(); -- cgit v1.2.3