Skip to content

Commit

Permalink
Revert "fixed build issues on travis ci"
Browse files Browse the repository at this point in the history
This reverts commit 88c5623.
  • Loading branch information
steffennissen committed Nov 29, 2015
1 parent e6f5343 commit 71ecf79
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/fann_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ void FannTest::AssertWeights(neural_net &net, fann_type min, fann_type max, fann

TEST_F(FannTest, CreateStandardThreeLayers) {
neural_net net(LAYER, 3, 2, 3, 4);
unsigned int layers[] = {2, 3, 4};
AssertCreateAndCopy(net, 3, layers, 11, 25);
AssertCreateAndCopy(net, 3, (unsigned int[]) {2, 3, 4}, 11, 25);
}

TEST_F(FannTest, CreateStandardThreeLayersUsingCreateMethod) {
Expand Down Expand Up @@ -91,14 +90,12 @@ TEST_F(FannTest, CreateStandardFourLayersVector) {

TEST_F(FannTest, CreateSparseFourLayers) {
neural_net net(0.5, 4, 2, 3, 4, 5);
unsigned int layers[] = {2, 3, 4, 5};
AssertCreateAndCopy(net, 4, layers, 17, 31);
AssertCreateAndCopy(net, 4, (unsigned int[]){2, 3, 4, 5}, 17, 31);
}

TEST_F(FannTest, CreateSparseFourLayersUsingCreateMethod) {
ASSERT_TRUE(net.create_sparse(0.5f, 4, 2, 3, 4, 5));
unsigned int layers[] = {2, 3, 4, 5};
AssertCreateAndCopy(net, 4, layers, 17, 31);
AssertCreateAndCopy(net, 4, (unsigned int[]){2, 3, 4, 5}, 17, 31);
}

TEST_F(FannTest, CreateSparseArrayFourLayers) {
Expand All @@ -121,15 +118,13 @@ TEST_F(FannTest, CreateSparseArrayWithMinimalConnectivity) {

TEST_F(FannTest, CreateShortcutFourLayers) {
neural_net net(SHORTCUT, 4, 2, 3, 4, 5);
unsigned int layers[] = {2, 3, 4, 5};
AssertCreateAndCopy(net, 4, layers, 15, 83);
AssertCreateAndCopy(net, 4, (unsigned int[]){2, 3, 4, 5}, 15, 83);
EXPECT_EQ(SHORTCUT, net.get_network_type());
}

TEST_F(FannTest, CreateShortcutFourLayersUsingCreateMethod) {
ASSERT_TRUE(net.create_shortcut(4, 2, 3, 4, 5));
unsigned int layers[] = {2, 3, 4, 5};
AssertCreateAndCopy(net, 4, layers, 15, 83);
AssertCreateAndCopy(net, 4, (unsigned int[]){2, 3, 4, 5}, 15, 83);
EXPECT_EQ(SHORTCUT, net.get_network_type());
}

Expand All @@ -153,8 +148,7 @@ TEST_F(FannTest, CreateFromFile) {
ASSERT_TRUE(netToBeSaved.save("tmpfile"));

neural_net netToBeLoaded("tmpfile");
unsigned int layers[] = {2, 3, 4};
AssertCreateAndCopy(netToBeLoaded, 3, layers, 11, 25);
AssertCreateAndCopy(netToBeLoaded, 3, (unsigned int[]){2, 3, 4}, 11, 25);
}

TEST_F(FannTest, CreateFromFileUsingCreateMethod) {
Expand All @@ -164,8 +158,7 @@ TEST_F(FannTest, CreateFromFileUsingCreateMethod) {

ASSERT_TRUE(net.create_from_file("tmpfile"));

unsigned int layers[] = {2, 3, 4};
AssertCreateAndCopy(net, 3, layers, 11, 25);
AssertCreateAndCopy(net, 3, (unsigned int[]){2, 3, 4}, 11, 25);
}

TEST_F(FannTest, RandomizeWeights) {
Expand Down

0 comments on commit 71ecf79

Please sign in to comment.