blob: ba0df4d7ec6127d99672f74bdb8e0352474f31db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}
}
}
}
|