summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-20 12:25:59 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-20 12:25:59 (GMT)
commit24dfefcbc7f6c7e01146684ed02b21624d83d9e3 (patch)
treea18f8f08eee67de4055dfc994115da505c7f9396
parent619d6c689561f1d73dd597ece8b5bfa61b565faa (diff)
downloaduscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.zip
uscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.tar.gz
uscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.tar.bz2
Fixed issue77 with URL resolved from CWD on windows
-rw-r--r--CMakeLists.txt2
-rw-r--r--contrib/cmake/BuildLibEvent.cmake4
-rw-r--r--contrib/cmake/BuildXercesC.cmake82
-rw-r--r--src/uscxml/util/URL.cpp8
-rw-r--r--test/src/test-validating.cpp90
5 files changed, 94 insertions, 92 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbf30bb..319fc8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -344,7 +344,7 @@ if (NOT IGNORE_V8)
endif()
# Lua
-OPTION(IGNORE_V8 "Do not search for the Lua libraries" OFF)
+OPTION(IGNORE_LUA "Do not search for the Lua libraries" OFF)
if (NOT IGNORE_LUA)
if (WIN32)
# LuaForWindows https://code.google.com/archive/p/luaforwindows/downloads
diff --git a/contrib/cmake/BuildLibEvent.cmake b/contrib/cmake/BuildLibEvent.cmake
index 486d4fb..f3bbc66 100644
--- a/contrib/cmake/BuildLibEvent.cmake
+++ b/contrib/cmake/BuildLibEvent.cmake
@@ -23,7 +23,9 @@ elseif (WIN32)
BUILD_COMMAND nmake -f Makefile.nmake
INSTALL_COMMAND
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/libevent/lib &&
- ${CMAKE_COMMAND} -E copy libevent.lib libevent_core.lib libevent_extras.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ &&
+ ${CMAKE_COMMAND} -E copy libevent.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ &&
+ ${CMAKE_COMMAND} -E copy libevent_core.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ &&
+ ${CMAKE_COMMAND} -E copy libevent_extras.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ &&
${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/libevent/include &&
${CMAKE_COMMAND} -E copy Win32-Code/event2/event-config.h ${CMAKE_BINARY_DIR}/deps/libevent/include/event2/
)
diff --git a/contrib/cmake/BuildXercesC.cmake b/contrib/cmake/BuildXercesC.cmake
index 994a365..26cbdb1 100644
--- a/contrib/cmake/BuildXercesC.cmake
+++ b/contrib/cmake/BuildXercesC.cmake
@@ -2,19 +2,7 @@
# see http://tools.cinemapub.be/opendcp/opendcp-0.19-src/contrib/CMakeLists.txt
include(ExternalProject)
-if (UNIX)
- externalproject_add(xerces-c
- URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz
- URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d
- BUILD_IN_SOURCE 0
- PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c
- CONFIGURE_COMMAND
- "<SOURCE_DIR>/configure"
- "--enable-static"
- "--enable-shared"
- "--prefix=<INSTALL_DIR>"
- )
-elseif(WIN32)
+if(MSVC)
set(VC_VERSION VC12)
# see https://en.wikipedia.org/wiki/Visual_C%2B%2B
@@ -42,38 +30,46 @@ elseif(WIN32)
set(VSPROJECT_PATH "projects/Win32/${VC_VERSION}/xerces-all/XercesLib")
+ set(XERCESC_BUILD_PATH_SUFFIX Win32)
+ set(XERCESC_BUILD_PLATFORM Win32)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- externalproject_add(xerces-c
- URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz
- URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d
- BUILD_IN_SOURCE 1
- PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c
- CONFIGURE_COMMAND ""
- # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=x64 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj
- # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
- BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=x64 ${VC_PLATFORM} /t:build XercesLib.vcxproj
- INSTALL_COMMAND
- ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ &&
- ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ &&
- ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
- )
- else()
- externalproject_add(xerces-c
- URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz
- URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d
- BUILD_IN_SOURCE 1
- PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c
- CONFIGURE_COMMAND ""
- # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=Win32 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj
- # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win32/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
- BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=Win32 ${VC_PLATFORM} /t:build XercesLib.vcxproj
- INSTALL_COMMAND
- ${CMAKE_COMMAND} -E copy_directory Build/Win32/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ &&
- ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ &&
- ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
- )
+ set(XERCESC_BUILD_PATH_SUFFIX Win64)
+ set(XERCESC_BUILD_PLATFORM x64)
endif()
-endif()
+
+ externalproject_add(xerces-c
+ URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz
+ URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d
+ BUILD_IN_SOURCE 1
+ PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c
+ CONFIGURE_COMMAND ""
+ # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=x64 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj
+ # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
+ BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=${XERCESC_BUILD_PLATFORM} ${VC_PLATFORM} /t:build XercesLib.vcxproj
+ INSTALL_COMMAND
+ ${CMAKE_COMMAND} -E make_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Debug &&
+ ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug &&
+ ${CMAKE_COMMAND} -E make_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Release &&
+ ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release &&
+ ${CMAKE_COMMAND} -E copy_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Debug/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ &&
+ ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/ &&
+ ${CMAKE_COMMAND} -E copy_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ &&
+ ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/ &&
+ ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/
+ )
+else()
+ externalproject_add(xerces-c
+ URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz
+ URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d
+ BUILD_IN_SOURCE 0
+ PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c
+ CONFIGURE_COMMAND
+ "<SOURCE_DIR>/configure"
+ "--enable-static"
+ "--enable-shared"
+ "--prefix=<INSTALL_DIR>"
+ )
+endif()
# TODO: --with-curl=DIR
diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp
index cb3abe3..561b9aa 100644
--- a/src/uscxml/util/URL.cpp
+++ b/src/uscxml/util/URL.cpp
@@ -141,8 +141,12 @@ URL URLImpl::resolveWithCWD(URLImpl* relative) {
currPath[sizeof(currPath) - 1] = '\0'; /* not really required? */
// without the trailing slash, last component is assumed a file
- std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR));
-
+#if WIN32
+ std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string(currPath)));
+#else
+ std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR));
+#endif
+
return resolve(relative, cwdURL.get());
}
diff --git a/test/src/test-validating.cpp b/test/src/test-validating.cpp
index 34d8122..3f7d0f9 100644
--- a/test/src/test-validating.cpp
+++ b/test/src/test-validating.cpp
@@ -44,9 +44,9 @@ int main(int argc, char** argv) {
while(iterations--) {
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Potential endless loop
-
+
const char* xml =
"<scxml datamodel=\"ecmascript\">"
" <datamodel><data id=\"counter\" expr=\"5\" /></datamodel>"
@@ -72,7 +72,7 @@ int main(int argc, char** argv) {
// Unreachable states 1
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"foo\">"
" <parallel id=\"foz\">"
" <state id=\"s0\" />"
@@ -91,9 +91,9 @@ int main(int argc, char** argv) {
if (1) {
// Invalid parents
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <onentry>"
- " <cancel sendidexpr=\"foo\" />"
+ " <cancel sendid=\"foo\" />"
" </onentry>"
"</scxml>";
@@ -102,11 +102,11 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (0) {
+ if (1) {
// State has no 'id' attribute
// *** This is not actually an error! ***
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state>"
" <transition/>"
" </state>"
@@ -120,7 +120,7 @@ int main(int argc, char** argv) {
if (1) {
// Duplicate state with id
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" />"
" <state id=\"start\" />"
"</scxml>";
@@ -134,7 +134,7 @@ int main(int argc, char** argv) {
// Transition has non-existant target state
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <transition target=\"done\" />"
" </state>"
@@ -149,7 +149,7 @@ int main(int argc, char** argv) {
// Useless history 1
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"bar\">"
" <history id=\"bar\" />"
" <state id=\"baz\" />"
@@ -168,7 +168,7 @@ int main(int argc, char** argv) {
// Useless history 2
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"bar\">"
" <history id=\"bar\">"
" <transition target=\"foo\" />"
@@ -188,7 +188,7 @@ int main(int argc, char** argv) {
// No legal completion
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"foo bar\">"
" <state id=\"foo\" />"
" <state id=\"bar\" />"
@@ -208,7 +208,7 @@ int main(int argc, char** argv) {
{
// initial attribute and <initial> child
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"foo\">"
" <initial>"
" <transition target=\"foo\" />"
@@ -225,7 +225,7 @@ int main(int argc, char** argv) {
{
// initial attribute with atomic state
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"\" />"
"</scxml>";
@@ -237,7 +237,7 @@ int main(int argc, char** argv) {
{
// initial child with atomic state
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition target=\"start\" />"
@@ -254,7 +254,7 @@ int main(int argc, char** argv) {
{
// send with content and namelist, not allowed
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <onentry>"
" <send target=\"#_external\" namelist=\"var1\">"
@@ -272,7 +272,7 @@ int main(int argc, char** argv) {
{
// send with content and params, not allowed
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <onentry>"
" <send target=\"#_external\">"
@@ -291,7 +291,7 @@ int main(int argc, char** argv) {
{
// send with params and namelist, perfectly acceptable
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <onentry>"
" <send target=\"#_external\" namelist=\"foo\">"
@@ -308,7 +308,7 @@ int main(int argc, char** argv) {
{
// invoke with content and src, not allowed
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <invoke type=\"scxml\" src=\"var1\">"
" <content>Foo!</content>"
@@ -324,7 +324,7 @@ int main(int argc, char** argv) {
{
// invoke with namelist and param, not allowed
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <invoke type=\"scxml\" namelist=\"var1\">"
" <param name=\"foo\" expr=\"3\" />"
@@ -340,7 +340,7 @@ int main(int argc, char** argv) {
{
// invoke with param and content, perfectly acceptable
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <invoke type=\"scxml\">"
" <param name=\"foo\" expr=\"3\" />"
@@ -356,7 +356,7 @@ int main(int argc, char** argv) {
{
// invoke with namelist and content, perfectly acceptable
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <invoke type=\"scxml\" namelist=\"var1\">"
" <content>Foo!</content>"
@@ -371,7 +371,7 @@ int main(int argc, char** argv) {
{
// donedata with content and param, not allowed
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <donedata>"
" <param name=\"foo\" expr=\"3\" />"
@@ -392,7 +392,7 @@ int main(int argc, char** argv) {
// Transition can never be optimally enabled (conditionless, eventless)
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <transition target=\"done\" />"
" <transition target=\"done\" />"
@@ -408,7 +408,7 @@ int main(int argc, char** argv) {
// Transition can never be optimally enabled (conditionless, more events)
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <transition event=\"error\" target=\"done\" />"
" <transition event=\"error.bar error.foo\" />"
@@ -426,7 +426,7 @@ int main(int argc, char** argv) {
// Initial attribute has invalid target state
const char* xml =
- "<scxml datamodel=\"ecmascript\" initial=\"foo\">"
+ "<scxml initial=\"foo\">"
"</scxml>";
std::set<std::string> issueLocations = issueLocationsForXML(xml);
@@ -438,7 +438,7 @@ int main(int argc, char** argv) {
// Initial attribute with target outside of children
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"foo done\">"
" <state id=\"foo\" />"
" </state>"
@@ -453,7 +453,7 @@ int main(int argc, char** argv) {
// Initial transition with target outside of children
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition target=\"foo done\" />"
@@ -471,7 +471,7 @@ int main(int argc, char** argv) {
// Initial history transition with target outside of children
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"bar\">"
" <history id=\"bar\">"
" <transition target=\"foo done\" />"
@@ -492,7 +492,7 @@ int main(int argc, char** argv) {
// Initial transition with target outside of children
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition target=\"foo done\" />"
@@ -510,7 +510,7 @@ int main(int argc, char** argv) {
if (1) {
// Initial transition with event
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition event=\"e.foo\" target=\"foo\" />"
@@ -529,7 +529,7 @@ int main(int argc, char** argv) {
if (1) {
// Initial transition with condition
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition cond=\"true\" target=\"foo\" />"
@@ -548,7 +548,7 @@ int main(int argc, char** argv) {
if (1) {
// Initial with multiple transitions
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial>"
" <transition target=\"foo\" />"
@@ -568,7 +568,7 @@ int main(int argc, char** argv) {
if (1) {
// Initial with no transitions
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <initial />"
" <state id=\"foo\" />"
@@ -586,7 +586,7 @@ int main(int argc, char** argv) {
if (1) {
// History transition with event
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"bar\">"
" <history id=\"bar\">"
" <transition event=\"e.foo\" target=\"foo\" />"
@@ -610,7 +610,7 @@ int main(int argc, char** argv) {
if (1) {
// History transition with condition
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\" initial=\"bar\">"
" <history id=\"bar\">"
" <transition cond=\"false\" target=\"foo\" />"
@@ -635,7 +635,7 @@ int main(int argc, char** argv) {
// Send to unknown IO Processor
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <onentry>"
" <send type=\"non-existant\" />"
@@ -664,7 +664,7 @@ int main(int argc, char** argv) {
// Unknown executable content element
const char* xml =
- "<scxml datamodel=\"ecmascript\">"
+ "<scxml>"
" <state id=\"start\">"
" <onentry>"
" <nonexistant />"
@@ -677,7 +677,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error in script
const char* xml =
@@ -692,7 +692,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error in cond attribute
const char* xml =
@@ -714,7 +714,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 3);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error in expr attribute
const char* xml =
@@ -745,7 +745,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 5);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error with foreach
const char* xml =
@@ -763,7 +763,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error with send
const char* xml =
@@ -780,7 +780,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error with invoke
const char* xml =
@@ -795,7 +795,7 @@ int main(int argc, char** argv) {
assert(issueLocations.size() == 1);
}
- if (1) {
+ if (Factory::getInstance()->hasDataModel("ecmascript")) {
// Syntax error with cancel
const char* xml =