probably the last commit, university project is done

parent bb3c9fb0
......@@ -39,16 +39,6 @@ target_compile_features(${TGT} PRIVATE cxx_std_17)
target_include_directories(${TGT} PRIVATE include/genimg)
target_link_libraries(${TGT} ${CONAN_LIBS} stdc++fs)
# Tests
if(TESTS)
set(TESTTGT genetic-image-tests)
file(GLOB TEST_FILES "tests/tests.cc")
add_executable(${TESTTGT} ${TEST_FILES})
target_compile_features(${TESTTGT} PRIVATE cxx_std_17)
target_include_directories(${TESTTGT} PRIVATE include/genimg)
target_link_libraries(${TESTTGT} ${CONAN_LIBS} stdc++fs)
endif()
# OS specific instructions.
if(APPLE)
elseif(WIN32)
......
#!/usr/bin/env fish
# This script was written to work with the fish shell. If you do not have the
# fish shell installed on your system, please install it before executing this
# script.
# The results will be stored in the output file `results.txt`
set nb_amelioration 10 50 100 200 500 1000
set nb_execution 200 100 50 20 10 5
set available_methods 1 2 3 4
set output results.txt
rm -f $output
for method in $available_methods
set nb_options (count $nb_execution)
echo "Method $method:" >> $output
echo "| / | < | < |" >> $output
echo "| Nb d’améliorations | Nb d’exécutions | Temps d’exécution (s) |" >> $output
echo "|--------------------+-----------------+-----------------------|" >> $output
for i in (seq $nb_options)
set total_exec_time 0
set startexec (date +%s.%N)
for j in $nb_execution[$i]
./build/bin/genetic-image -i ./img/mahakala-monochrome.jpg \
-n $nb_amelioration[$i] -m $method
end
set endexec (date +%s.%N)
set total_exec_time (math "$total_exec_time+($endexec-$startexec)/$i")
echo "|$nb_amelioration[$i]|$nb_execution[$i]|$total_exec_time|" >> $output
end
echo "" >> $output
end
This diff is collapsed.
No preview for this file type
......@@ -81,7 +81,6 @@ void processFilenames(po::variables_map const &t_vm, path const &t_input,
ret.output_path = output_path;
ret.iterations = vm.count("iterations") ? vm["iterations"].as<int>()
: DEFAULT_ITERATIONS;
spdlog::debug("arg: {}", vm.count("form") ? vm["form"].as<int>() : 1);
ret.method = vm.count("method") ? vm["method"].as<int>() : 1;
switch (vm.count("form") ? vm["form"].as<int>() : 1) {
case 2: ret.shape = Shape::ShapeType::Triangle; break;
......
#include <gtest/gtest.h>
TEST(SquareRootTest, PositiveNos)
{
ASSERT_EQ(6, 2 * 3);
ASSERT_EQ(6, -2 * -3);
}
TEST(SquareRootTest, NegativeNos)
{
ASSERT_EQ(-6, -2 * 3);
ASSERT_EQ(-6, 2 * -3);
}
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment