Skip to content

Commit

Permalink
Warning fixes in unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoel committed Feb 15, 2024
1 parent 03fedb4 commit 00a882d
Show file tree
Hide file tree
Showing 71 changed files with 70 additions and 282 deletions.
3 changes: 0 additions & 3 deletions tests/gtests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ GTESTS_ALL=\
test_multi_index.cpp\
test_idea.cpp\
test_multinomial.cpp\
test_multi_index.cpp\
test_param_init_vector_vector.cpp\
test_param_init_matrix_vector.cpp\
test_param_init_bounded_vector_vector.cpp\
Expand Down Expand Up @@ -87,8 +86,6 @@ GTESTS_ALL=\
test_atan2.cpp\
test_gradcalc.cpp\
test_autodif.cpp\
test_atomic.cpp\
test_shared_ptr.cpp\
test_param_init_bounded_dev_vector.cpp\
test_experimenting_mcmc.cpp\
test_gradient_descent.cpp\
Expand Down
7 changes: 2 additions & 5 deletions tests/gtests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
#include <windows.h>
#endif

extern "C"
void test_ad_exit(const int exit_code)
{
void test_ad_exit(const int exit_code)
{
throw exit_code;
}
throw exit_code;
}

int main(int argc, char** argv)
Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_ad_comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <fvar.hpp>
#include <cmath>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_ad_comm: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_admb_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
#include <admodel.h>
#include <df1b2fun.h>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_admb_messages: public ::testing::Test
{
Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_adstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
#include <admodel.h>
#include <climits>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_adstring: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_adstring_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <fvar.hpp>
#include <adstring.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_adstring_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_arr_link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include "fvar.hpp"
#include <cassert>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_arr_link: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_arr_list.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_arr_list: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_atan2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <fvar.hpp>
#include <cmath>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_atan2: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_autodif.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_autodif: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_cfenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_cfenv: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_d3_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <cmath>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_d3_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_d4_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <cmath>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_d4_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_d5_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <cmath>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_d5_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_d6_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <cmath>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_d6_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_d7_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <cmath>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_d7_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_data_int.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <admodel.h>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_data_int: public ::testing::Test { };

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_data_matrix.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "admodel.h"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_data_matrix: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_data_number.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <admodel.h>
#include <df1b2fun.h>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_data_number: public ::testing::Test { };

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dcompressed_triplet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#define XCONST const
#include <hs.h>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dcompressed_triplet: public ::testing::Test { };

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dependent_variables_information.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dependent_variables_information: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_df1b2vector.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "df1b2fun.h"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

extern df1b2_gradlist* f1b2gradlist;

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_df_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#include <limits.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_df_file:public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dfpool.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "fvar.hpp"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dfpool: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dll_param_init_bounded_vector.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "admodel.h"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dll_param_init_bounded_vector: public ::testing::Test
{
Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dll_param_matrix.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include "admodel.h"

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dll_param_matrix: public ::testing::Test
{
Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <fvar.hpp>
#include <climits>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dmatrix: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dvar3_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#include <fvar.hpp>
#include <cmath>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dvar3_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dvar4_array.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dvar4_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dvar5_array.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dvar5_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dvar6_array.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dvar6_array: public ::testing::Test {};

Expand Down
5 changes: 1 addition & 4 deletions tests/gtests/test_dvar7_array.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>
#include <fvar.hpp>

extern "C"
{
void test_ad_exit(const int exit_code);
}
void test_ad_exit(const int exit_code);

class test_dvar7_array: public ::testing::Test {};

Expand Down
Loading

0 comments on commit 00a882d

Please sign in to comment.