v8 integration initial commit

This commit is contained in:
Marek Kotewicz 2015-04-27 21:42:51 +02:00
parent b129a201db
commit 81d7d0874e
3 changed files with 32 additions and 0 deletions

View File

@ -25,6 +25,8 @@ add_subdirectory(libethereum)
add_subdirectory(libevm)
add_subdirectory(libnatspec)
add_subdirectory(libp2p)
add_subdirectory(libethconsole)
if (SOLIDITY)
add_subdirectory(libsolidity)
endif ()
@ -40,6 +42,7 @@ include_directories(BEFORE ..)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(${V8_INCLUDE_DIRS})
# search for test names and create ctest tests
enable_testing()
@ -65,6 +68,7 @@ target_link_libraries(testeth ${CURL_LIBRARIES})
target_link_libraries(testeth ethereum)
target_link_libraries(testeth ethcore)
target_link_libraries(testeth secp256k1)
target_link_libraries(testeth ethconsole)
if (SOLIDITY)
target_link_libraries(testeth solidity)
endif ()

View File

@ -0,0 +1,7 @@
cmake_policy(SET CMP0015 NEW)
aux_source_directory(. SRCS)
add_sources(${SRCS})

View File

@ -0,0 +1,21 @@
//
// Created by Marek Kotewicz on 27/04/15.
//
#include <boost/test/unit_test.hpp>
#include "../../libethconsole/JSV8ScopeBase.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
BOOST_AUTO_TEST_SUITE(jsscope)
BOOST_AUTO_TEST_CASE(common)
{
JSV8ScopeBase scope;
string result = scope.evaluate("1 + 1");
BOOST_CHECK_EQUAL(result, "2");
}
BOOST_AUTO_TEST_SUITE_END()