diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/neural_network.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/neural_network.cpp b/test/neural_network.cpp new file mode 100644 index 0000000..ba0df4d --- /dev/null +++ b/test/neural_network.cpp @@ -0,0 +1,24 @@ +#include "catch.hpp" +#include <sstream> + +#include "brain/neural_network.h" + +SCENARIO("network is read from istream") +{ + GIVEN("an empty config file") + { + std::stringstream file; + file << "" << std::endl; + + WHEN ("the network is initialized") + { + NeuralNetwork network(std::move(file), 1, 2); + + THEN("the specified number of inputs and outputs are created") + { + REQUIRE(network.numberOfSensors() == 1); + REQUIRE(network.numberOfOutputs() == 2); + } + } + } +} |