# HG changeset patch # User Alain Mazy # Date 1588187449 -7200 # Node ID 5630c2fb7b0f9318ead05247754a2d3b23e79ec4 # Parent 65e1e4b0830274d47330f0b31e1f59e4b114b1fb cleanup + reactivate UnitTests diff -r 65e1e4b08302 -r 5630c2fb7b0f .hgignore --- a/.hgignore Wed Apr 29 20:50:53 2020 +0200 +++ b/.hgignore Wed Apr 29 21:10:49 2020 +0200 @@ -4,19 +4,8 @@ *.h.orig .vs/ .vscode/ -Applications/Qt/archive/ -Applications/Samples/Deprecated/ThirdPartyDownloads/ -Applications/Samples/Deprecated/build-wasm/ -Applications/Samples/Deprecated/build-web/ -Applications/Samples/Deprecated/node_modules/ -Applications/Samples/Deprecated/rt-viewer-demo/ThirdPartyDownloads/ -Applications/Samples/Deprecated/rt-viewer-demo/build-sdl-msvc15/ -Applications/Samples/Deprecated/rt-viewer-demo/build-tsc-output/ -Applications/Samples/Deprecated/rt-viewer-demo/build-wasm/ -Applications/Samples/Deprecated/rt-viewer-demo/build-web/ -Applications/build-* +build*/ CMakeLists.txt.user -Platforms/Generic/ThirdPartyDownloads/ Resources/CodeGeneration/.env Resources/CodeGeneration/.idea Resources/CodeGeneration/__pycache__ @@ -42,6 +31,6 @@ Samples/Deprecated/WebAssembly/build/ Samples/Deprecated/WebAssembly/ThirdPartyDownloads/ Samples/Deprecated/WebAssembly/installDir/ - +UnitTestsSources/ThirdPartyDownloads/ node_modules/ diff -r 65e1e4b08302 -r 5630c2fb7b0f Resources/CMake/OrthancStoneConfiguration.cmake --- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 20:50:53 2020 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 21:10:49 2020 +0200 @@ -288,8 +288,6 @@ endif() list(APPEND ORTHANC_STONE_SOURCES - #${ORTHANC_STONE_ROOT}/Framework/Layers/SeriesFrameRendererFactory.cpp - #${ORTHANC_STONE_ROOT}/Framework/Layers/SingleFrameRendererFactory.cpp ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomDatasetReader.cpp ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomPath.cpp diff -r 65e1e4b08302 -r 5630c2fb7b0f UnitTestsSources/CMakeLists.txt --- a/UnitTestsSources/CMakeLists.txt Wed Apr 29 20:50:53 2020 +0200 +++ b/UnitTestsSources/CMakeLists.txt Wed Apr 29 21:10:49 2020 +0200 @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 2.8.3) project(OrthancStone) +set(ORTHANC_FRAMEWORK_SOURCE "path") +set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../orthanc) +set(STONE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../) + include(../Resources/CMake/OrthancStoneParameters.cmake) set(ENABLE_STONE_DEPRECATED ON) # Need deprecated classes for these samples @@ -11,7 +15,7 @@ set(ENABLE_SDL OFF CACHE BOOL "Target SDL Native application") set(ENABLE_WASM OFF CACHE BOOL "Target WASM application") -set(ENABLE_UNITTESTS ON +set(ENABLE_UNITTESTS ON BOOL "Enable unit tests") if (ENABLE_WASM) diff -r 65e1e4b08302 -r 5630c2fb7b0f UnitTestsSources/GenericToolboxTests.cpp --- a/UnitTestsSources/GenericToolboxTests.cpp Wed Apr 29 20:50:53 2020 +0200 +++ b/UnitTestsSources/GenericToolboxTests.cpp Wed Apr 29 21:10:49 2020 +0200 @@ -3846,7 +3846,7 @@ } } -static const size_t NUM_TIMINGS_CONVS = 2000; +static const size_t NUM_TIMINGS_CONVS = 1; // set to 2000 if you want to measure perfs; //4444444444444444$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ diff -r 65e1e4b08302 -r 5630c2fb7b0f UnitTestsSources/UnitTestsMain.cpp --- a/UnitTestsSources/UnitTestsMain.cpp Wed Apr 29 20:50:53 2020 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Wed Apr 29 21:10:49 2020 +0200 @@ -21,15 +21,10 @@ #include "gtest/gtest.h" -#include "../Framework/Deprecated/Layers/FrameRenderer.h" -#include "../Framework/Deprecated/Toolbox/DownloadStack.h" -#include "../Framework/Deprecated/Toolbox/MessagingToolbox.h" -#include "../Framework/Deprecated/Toolbox/OrthancSlicesLoader.h" #include "../Framework/StoneInitialization.h" #include "../Framework/Toolbox/FiniteProjectiveCamera.h" #include "../Framework/Toolbox/GeometryToolbox.h" #include "../Framework/Volumes/ImageBuffer3D.h" -#include "../Platforms/Generic/OracleWebService.h" #include #include @@ -633,14 +628,6 @@ */ } -TEST(MessagingToolbox, ParseJson) -{ - Json::Value response; - std::string source = "{\"command\":\"panel:takeDarkImage\",\"commandType\":\"simple\",\"args\":{}}"; - ASSERT_TRUE(Deprecated::MessagingToolbox::ParseJson(response, source.c_str(), source.size())); -} - - static bool IsEqualVectorL1(OrthancStone::Vector a, OrthancStone::Vector b)