Skip to content

Commit

Permalink
unit test for NFsim
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jul 25, 2024
1 parent 8b020bb commit 6886a0c
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
/all_solvers/*

.DS_Store

NFsim_v1.11/tests/data/SimID_273069657_0_.gdat

NFsim_v1.11/tests/data/SimID_273069657_0_.species
6 changes: 5 additions & 1 deletion NFsim_v1.11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ endif (UNIX)
set(exe_target NFsim)
if (ARCH_64bit)
set(exe_target ${exe_target}_x64)
endif (ARCH_64bit)
endif (ARCH_64bit)

enable_testing()

add_executable(${exe_target} ${SRC_FILES})
target_link_libraries(${exe_target} vcommons vcellmessaging)

add_test(NAME ${exe_target}_test2 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1.sh ${CMAKE_BINARY_DIR}/bin/${exe_target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests)

install(TARGETS ${exe_target} RUNTIME DESTINATION ${OPTION_EXE_DIRECTORY})

12 changes: 12 additions & 0 deletions NFsim_v1.11/tests/data/SimID_273069657_0_.gdat.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# time O0_MT0_tot_Count O0_MT1_tot_Count O0_MT2_tot_Count O0_MT3_tot_Count O0_MT4_tot_Count s0_Count s1_Count s2_Count s3_Count s4_Count
0.00000000e+00 6.02000000e+02 9.03000000e+02 1.20400000e+03 0.00000000e+00 0.00000000e+00 6.02000000e+02 9.03000000e+02 1.20400000e+03 0.00000000e+00 0.00000000e+00
1.00000000e-01 5.37000000e+02 9.68000000e+02 1.13900000e+03 0.00000000e+00 0.00000000e+00 5.37000000e+02 9.68000000e+02 1.13900000e+03 0.00000000e+00 0.00000000e+00
2.00000000e-01 5.24000000e+02 9.81000000e+02 1.12600000e+03 0.00000000e+00 0.00000000e+00 5.24000000e+02 9.81000000e+02 1.12600000e+03 0.00000000e+00 0.00000000e+00
3.00000000e-01 5.23000000e+02 9.82000000e+02 1.12500000e+03 0.00000000e+00 0.00000000e+00 5.23000000e+02 9.82000000e+02 1.12500000e+03 0.00000000e+00 0.00000000e+00
4.00000000e-01 5.30000000e+02 9.75000000e+02 1.13200000e+03 0.00000000e+00 0.00000000e+00 5.30000000e+02 9.75000000e+02 1.13200000e+03 0.00000000e+00 0.00000000e+00
5.00000000e-01 5.23000000e+02 9.82000000e+02 1.12500000e+03 0.00000000e+00 0.00000000e+00 5.23000000e+02 9.82000000e+02 1.12500000e+03 0.00000000e+00 0.00000000e+00
6.00000000e-01 5.21000000e+02 9.84000000e+02 1.12300000e+03 0.00000000e+00 0.00000000e+00 5.21000000e+02 9.84000000e+02 1.12300000e+03 0.00000000e+00 0.00000000e+00
7.00000000e-01 5.20000000e+02 9.85000000e+02 1.12200000e+03 0.00000000e+00 0.00000000e+00 5.20000000e+02 9.85000000e+02 1.12200000e+03 0.00000000e+00 0.00000000e+00
8.00000000e-01 5.13000000e+02 9.92000000e+02 1.11500000e+03 0.00000000e+00 0.00000000e+00 5.13000000e+02 9.92000000e+02 1.11500000e+03 0.00000000e+00 0.00000000e+00
9.00000000e-01 5.13000000e+02 9.92000000e+02 1.11500000e+03 0.00000000e+00 0.00000000e+00 5.13000000e+02 9.92000000e+02 1.11500000e+03 0.00000000e+00 0.00000000e+00
1.00000000e+00 5.33000000e+02 9.72000000e+02 1.13500000e+03 0.00000000e+00 0.00000000e+00 5.33000000e+02 9.72000000e+02 1.13500000e+03 0.00000000e+00 0.00000000e+00
Loading

0 comments on commit 6886a0c

Please sign in to comment.