Skip to content
Snippets Groups Projects
Commit a3f125b6 authored by Jakhes's avatar Jakhes
Browse files

Updating tests so they can be call from all_tests.pl

parent 40d1dfc8
No related branches found
No related tags found
No related merge requests found
:- module(helper_tests, [run_helper_tests/0]).
:- use_module(library(plunit)). :- use_module(library(plunit)).
...@@ -8,7 +10,7 @@ ...@@ -8,7 +10,7 @@
:- begin_tests(b). :- begin_tests(b).
test(matrix) :- test(matrix, fail) :-
open('/home/afkjakhes/eclipse-workspace/prolog-mlpack-libary/src/data_csv/iris2.csv', read, File), open('/home/afkjakhes/eclipse-workspace/prolog-mlpack-libary/src/data_csv/iris2.csv', read, File),
take_csv_row(File, skipFirstRow, 2, Records), take_csv_row(File, skipFirstRow, 2, Records),
print(Records), print(Records),
...@@ -19,3 +21,6 @@ test(matrix) :- ...@@ -19,3 +21,6 @@ test(matrix) :-
print('\n'). print('\n').
:- end_tests(b). :- end_tests(b).
run_helper_tests :-
run_tests.
\ No newline at end of file
:- module(adaboost_tests, [run_adaboost_tests/0]).
:- use_module(library(plunit)). :- use_module(library(plunit)).
:- use_module(adaboost). :- use_module(adaboost).
...@@ -6,6 +9,7 @@ ...@@ -6,6 +9,7 @@
:- use_module('../../helper_files/helper.pl'). :- use_module('../../helper_files/helper.pl').
reset_Model_No_Train(Learner) :- reset_Model_No_Train(Learner) :-
initModelNoTraining(0.0001, Learner). initModelNoTraining(0.0001, Learner).
...@@ -13,6 +17,7 @@ reset_Model_With_Train(Learner) :- ...@@ -13,6 +17,7 @@ reset_Model_With_Train(Learner) :-
initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 0, 1, 0], 2, Learner, 50, 0.0001). initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 0, 1, 0], 2, Learner, 50, 0.0001).
%% %%
%% TESTING predicate initModelWithTraining/7 %% TESTING predicate initModelWithTraining/7
%% %%
...@@ -319,3 +324,5 @@ test(train_After_InitTrain_Decision_Stump, [true(Error =:= 1)]) :- ...@@ -319,3 +324,5 @@ test(train_After_InitTrain_Decision_Stump, [true(Error =:= 1)]) :-
:- end_tests(train). :- end_tests(train).
run_adaboost_tests :-
run_tests.
\ No newline at end of file
:- module(new_method_tests, [run_new_method_tests/0]).
:- use_module(library(plunit)). :- use_module(library(plunit)).
:- use_module(new_method). :- use_module(new_method).
...@@ -37,3 +39,5 @@ test(testDescription4, [true(Error =:= 0.9797958971132711)]) :- ...@@ -37,3 +39,5 @@ test(testDescription4, [true(Error =:= 0.9797958971132711)]) :-
:- end_tests(predicate). :- end_tests(predicate).
run_new_method_tests :-
run_tests.
:- module(sparse_coding_tests, [run_sparse_coding_tests/0]).
:- use_module(library(plunit)). :- use_module(library(plunit)).
:- use_module(sparse_coding). :- use_module(sparse_coding).
...@@ -173,3 +175,7 @@ test(train_With_CSV_Input) :- ...@@ -173,3 +175,7 @@ test(train_With_CSV_Input) :-
:- end_tests(train). :- end_tests(train).
run_sparse_coding_tests :-
run_tests.
:- ['src/methods/adaboost/adaboost_test.pl'].
:- ['src/methods/sparse_coding/sparse_coding_test.pl']. :- use_module('src/methods/adaboost/adaboost_test.pl').
\ No newline at end of file
:- use_module('src/methods/sparse_coding/sparse_coding_test.pl').
:- use_module('src/helper_files/helper_tests.pl').
run :-
run_adaboost_tests,
run_sparse_coding_tests,
run_helper_tests.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment