Mercurial > hg > orthanc
diff OrthancFramework/UnitTestsSources/StreamTests.cpp @ 4325:b96aedfa8cc1
unit tests now running in WebAssembly
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 24 Nov 2020 16:21:29 +0100 |
parents | 318c16cfccab |
children | d9473bd5ed43 |
line wrap: on
line diff
--- a/OrthancFramework/UnitTestsSources/StreamTests.cpp Tue Nov 24 12:37:52 2020 +0100 +++ b/OrthancFramework/UnitTestsSources/StreamTests.cpp Tue Nov 24 16:21:29 2020 +0100 @@ -27,15 +27,18 @@ #include <gtest/gtest.h> -#include "../Sources/SystemToolbox.h" #include "../Sources/Toolbox.h" #include "../Sources/OrthancException.h" #include "../Sources/HttpServer/BufferHttpSender.h" -#include "../Sources/HttpServer/FilesystemHttpSender.h" #include "../Sources/HttpServer/HttpStreamTranscoder.h" #include "../Sources/Compression/ZlibCompressor.h" #include "../Sources/Compression/GzipCompressor.h" +#if ORTHANC_SANDBOXED != 1 +# include "../Sources/HttpServer/FilesystemHttpSender.h" +# include "../Sources/SystemToolbox.h" +#endif + using namespace Orthanc; @@ -171,6 +174,7 @@ } +#if ORTHANC_SANDBOXED != 1 static bool ReadAllStream(std::string& result, IHttpStreamAnswer& stream, bool allowGzip = false, @@ -195,8 +199,10 @@ return pos == result.size(); } +#endif +#if ORTHANC_SANDBOXED != 1 TEST(BufferHttpSender, Basic) { const std::string s = "Hello world"; @@ -218,8 +224,10 @@ ASSERT_EQ(s, t); } } +#endif +#if ORTHANC_SANDBOXED != 1 TEST(FilesystemHttpSender, Basic) { const std::string& path = "UnitTestsResults/stream"; @@ -240,8 +248,10 @@ ASSERT_EQ(0u, t.size()); } } +#endif +#if ORTHANC_SANDBOXED != 1 TEST(HttpStreamTranscoder, Basic) { ZlibCompressor compressor; @@ -322,3 +332,4 @@ ASSERT_EQ(0u, u.size()); } } +#endif