@@ -70,31 +70,43 @@ function spearmanEdgeTest(testCase)
7070 edge_result = testCase .tests .runEdgeTestPerm(testCase .edge_test_options , testCase .permutations , 0 );
7171
7272 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " spearman_result.mat" )));
73- testCase .verifyEqual(expected_result .edge_result , edge_result );
73+ property_names = properties(edge_result );
74+ for prop_name = property_names
75+ testCase .verifyEqual(expected_result .edge_result.(prop_name{1 }), edge_result.(prop_name{1 }));
76+ end
7477 end
7578
7679 function pearsonEdgeTest(testCase )
7780 testCase.tests.edge_test = nla .edge .test .Pearson();
7881 edge_result = testCase .tests .runEdgeTestPerm(testCase .edge_test_options , testCase .permutations , 0 );
7982
8083 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " pearson_result.mat" )));
81- testCase .verifyEqual(expected_result .edge_result , edge_result );
84+ property_names = properties(edge_result );
85+ for prop_name = property_names
86+ testCase .verifyEqual(expected_result .edge_result.(prop_name{1 }), edge_result.(prop_name{1 }));
87+ end
8288 end
8389
8490 function kendallBTest(testCase )
8591 testCase.tests.edge_test = nla .edge .test .KendallB();
8692 edge_result = testCase .tests .runEdgeTestPerm(testCase .edge_test_options , testCase .permutations , 0 );
8793
8894 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " kendallb_result.mat" )));
89- testCase .verifyEqual(expected_result .edge_result , edge_result );
95+ property_names = properties(edge_result );
96+ for prop_name = property_names
97+ testCase .verifyEqual(expected_result .edge_result.(prop_name{1 }), edge_result.(prop_name{1 }));
98+ end
9099 end
91100
92101 function spearmanEstimatorTest(testCase )
93102 testCase.tests.edge_test = nla .edge .test .SpearmanEstimator();
94103 edge_result = testCase .tests .runEdgeTestPerm(testCase .edge_test_options , testCase .permutations , 0 );
95104
96105 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " spearman_estimator_result.mat" )));
97- testCase .verifyEqual(expected_result .edge_result , edge_result );
106+ property_names = properties(edge_result );
107+ for prop_name = property_names
108+ testCase .verifyEqual(expected_result .edge_result.(prop_name{1 }), edge_result.(prop_name{1 }));
109+ end
98110 end
99111
100112 function chiSquaredTest(testCase )
@@ -103,7 +115,10 @@ function chiSquaredTest(testCase)
103115 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
104116
105117 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " chi_squared_result.mat" )));
106- testCase .verifyEqual(expected_result .network_result , network_result{1 });
118+ property_names = properties(network_result{1 });
119+ for prop_name = property_names
120+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
121+ end
107122 end
108123
109124 function hyperGeometricTest(testCase )
@@ -112,7 +127,10 @@ function hyperGeometricTest(testCase)
112127 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
113128
114129 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " hypergeometric_result.mat" )));
115- testCase .verifyEqual(expected_result .network_result , network_result{1 });
130+ property_names = properties(network_result{1 });
131+ for prop_name = property_names
132+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
133+ end
116134 end
117135
118136 function kolmogorovSmirnovTest(testCase )
@@ -121,7 +139,10 @@ function kolmogorovSmirnovTest(testCase)
121139 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
122140
123141 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " kolmogorov_smirnov_result.mat" )));
124- testCase .verifyEqual(expected_result .network_result , network_result{1 });
142+ property_names = properties(network_result{1 });
143+ for prop_name = property_names
144+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
145+ end
125146 end
126147
127148 function studentTTest(testCase )
@@ -130,7 +151,10 @@ function studentTTest(testCase)
130151 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
131152
132153 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " student_t_result.mat" )));
133- testCase .verifyEqual(expected_result .network_result , network_result{1 });
154+ property_names = properties(network_result{1 });
155+ for prop_name = property_names
156+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
157+ end
134158 end
135159
136160 function welchTTest(testCase )
@@ -139,7 +163,10 @@ function welchTTest(testCase)
139163 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
140164
141165 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " welch_t_result.mat" )));
142- testCase .verifyEqual(expected_result .network_result , network_result{1 });
166+ property_names = properties(network_result{1 });
167+ for prop_name = property_names
168+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
169+ end
143170 end
144171
145172 function wilcoxonTest(testCase )
@@ -148,7 +175,10 @@ function wilcoxonTest(testCase)
148175 network_result = testCase .tests .runNetTestsPerm(testCase .network_test_options , testCase .edge_test_options .net_atlas , edge_result .edge_result );
149176
150177 expected_result = load(strcat(testCase .root_path , fullfile(" +nla" , " unittests" , " wilocoxon_result.mat" )));
151- testCase .verifyEqual(expected_result .network_result , network_result{1 });
178+ property_names = properties(network_result{1 });
179+ for prop_name = property_names
180+ testCase .verifyEqual(expected_result .network_result.(prop_name{1 }), network_result{1 }.(prop_name{1 }));
181+ end
152182 end
153183 end
154184end
0 commit comments