ttest for bitwise reproducibility of ocean vtk file - Granular.jl - Julia packa… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 8d9d1a1c3cc244bb6bd388396763dfe93efa9f63 | |
parent 816d2940705da93523d3b719dc8eea68a28c78cc | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 28 Apr 2017 15:05:03 -0400 | |
ttest for bitwise reproducibility of ocean vtk file | |
Diffstat: | |
M test/vtk.jl | 12 ++++++++---- | |
1 file changed, 8 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/test/vtk.jl b/test/vtk.jl | |
t@@ -8,14 +8,18 @@ info("Writing simple simulation to VTK file") | |
sim = SeaIce.createSimulation(id="test") | |
SeaIce.addIceFloeCylindrical(sim, [ 0., 0.], 10., 1., verbose=false) | |
SeaIce.addIceFloeCylindrical(sim, [18., 0.], 10., 1., verbose=false) | |
+sim.ocean = SeaIce.createRegularOceanGrid([10, 20, 5], [10., 25., 2.]) | |
SeaIce.writeVTK(sim) | |
if Base.is_linux() | |
- checksum = readstring(`sha256sum test.icefloes.1.vtu`) | |
+ cmd = "sha256sum" | |
elseif Base.is_apple() | |
- checksum = readstring(`shasum -a 256 test.icefloes.1.vtu`) | |
+ cmd = "shasum -a 256" | |
else | |
- warn("checksum verification of VTK file not supported on this platform") | |
+ error("checksum verification of VTK file not supported on this platform") | |
end | |
+@test readstring(`$(cmd) test.icefloes.1.vtu`) == "1c0c2bdd265abdda22ef3727e7c… | |
+@test readstring(`$(cmd) test.ocean.1.vts`) == "f0117e414c4e71a0c55980f63865eb… | |
+ | |
rm("test.icefloes.1.vtu") | |
-@test checksum == "1c0c2bdd265abdda22ef3727e7cac829e2321462d494be2e23364653f95… | |
+rm("test.ocean.1.vts") |