88# along with this program. If not, see <http://www.gnu.org/licenses/>.
99# -------------------------------------------------------------------------------
1010
11+ #
12+ # Set up
13+ #
14+
1115context(' ds.dataFrameSort::expt_dgr::setup' )
1216
1317source(' connection_to_datasets/init_testing_datasets.R' )
1418source(' definition_tests/def-ds.dataFrameSort.R' )
1519
20+ #
21+ # Tests
22+ #
23+
1624context(" ds.dataFrameSort::expt_dgr::multiple::correct_parameter_class" )
1725test_that(' all datasets' ,
1826 {
@@ -31,6 +39,7 @@ test_that('all datasets',
3139 .test.function.parameters(" D" ," D$NUMERIC_ONE_CHANGE" ,TRUE ," alphabetic" ," server.data" )
3240 .test.function.parameters(" D" ," D$INTEGER_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
3341 })
42+
3443context(" ds.dataFrameSort::expt_dgr::single::correct_parameter_class" )
3544test_that(' dataset 2' ,
3645 {
@@ -49,6 +58,7 @@ test_that('dataset 2',
4958 .test.function.parameters(" D" ," D$NUMERIC_ONE_CHANGE" ,TRUE ," alphabetic" ," server.data" )
5059 .test.function.parameters(" D" ," D$INTEGER_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
5160 })
61+
5262context(" ds.dataFrameSort::expt_dgr::multiple::incorrect_parameter_class" )
5363test_that(' all datasets' ,
5464 {
@@ -65,6 +75,7 @@ test_that('all datasets',
6575 .test.function.parameters(" D" ," D$NUMERIC_ONE_CHANGE" ,TRUE ," alphabetic" ,23 )
6676 .test.function.parameters(" dataframe" ," D$INTEGER_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
6777 })
78+
6879context(" ds.dataFrameSort::expt_dgr::single::incorrect_parameter_class" )
6980test_that(' dataset 2' ,
7081 {
@@ -98,6 +109,7 @@ test_that('all datasets',
98109 .test.data.frame.creation(" D" ," NUMERIC_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
99110 .test.data.frame.creation(" D" ," INTEGER_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
100111 })
112+
101113context(" ds.dataFrameSort::expt_dgr::single::df::creation" )
102114test_that(' dataset 3' ,
103115 {
@@ -114,6 +126,7 @@ test_that('dataset 3',
114126 .test.data.frame.creation(" D" ," NUMERIC_ONE_CHANGE" ,TRUE ," numeric" ," server.data" )
115127 .test.data.frame.creation(" D" ," INTEGER_ONE_CHANGE" ,FALSE ," alphabetic" ," server.data" )
116128 })
129+
117130context(" ds.dataFrameSort::expt_dgr::multiple::numeric::ascending" )
118131test_that(' all datasets' ,
119132 {
@@ -124,7 +137,6 @@ test_that('all datasets',
124137 local.df.list [[i ]][," FACTOR_INTEGER" ]<- as.factor(local.df.list [[i ]][," FACTOR_INTEGER" ])
125138 colnames(local.df.list [[i ]])<- ds.colnames(" D" ,datasources = ds.test_env $ connections [i ][[1 ]])
126139 }
127- print(' ------' )
128140 .test.data.frame.sorting(" D" ," LOGICAL" ,FALSE ," numeric" ," server.data" ,local.df.list )
129141 # .test.data.frame.sorting("D","INTEGER",FALSE,"numeric","server.data",local.df.list)
130142 .test.data.frame.sorting(" D" ," POSITIVE_INTEGER" ,FALSE ," numeric" ," server.data" ,local.df.list )
@@ -139,9 +151,8 @@ test_that('all datasets',
139151 .test.data.frame.sorting(" D" ," FACTOR_INTEGER" ,FALSE ," numeric" ," server.data" ,local.df.list )
140152 # .test.data.frame.sorting("D","FACTOR_CHARACTER",FALSE,"numeric","server.data",local.df.list)
141153 # .test.data.frame.sorting("D","CHARACTER",FALSE,"numeric","server.data",local.df.list)
142-
143-
144154 })
155+
145156context(" ds.dataFrameSort::expt_dgr::single::numeric::ascending" )
146157test_that(' dataset 1' ,
147158 {
@@ -172,6 +183,7 @@ test_that('dataset 1',
172183
173184
174185 })
186+
175187context(" ds.dataFrameSort::expt_dgr::multiple::numeric::descending" )
176188test_that(' all datasets' ,
177189 {
@@ -199,6 +211,7 @@ test_that('all datasets',
199211
200212
201213 })
214+
202215context(" ds.dataFrameSort::expt_dgr::single::numeric::descending" )
203216test_that(' dataset 1' ,
204217 {
@@ -255,6 +268,7 @@ test_that('all datasets',
255268 # .test.data.frame.sorting("D","FACTOR_CHARACTER",FALSE,"alphabetic","server.data",local.df.list)
256269 .test.data.frame.sorting(" D" ," CHARACTER" ,FALSE ," alphabetic" ," server.data" ,local.df.list )
257270 })
271+
258272context(" ds.dataFrameSort::expt_dgr::single::alphabetic::ascending" )
259273test_that(' dataset 2' ,
260274 {
@@ -282,6 +296,7 @@ test_that('dataset 2',
282296 # .test.data.frame.sorting("D","FACTOR_CHARACTER",FALSE,"alphabetic","server.data",local.df.list)
283297 .test.data.frame.sorting(" D" ," CHARACTER" ,FALSE ," alphabetic" ," server.data" ,local.df.list )
284298 })
299+
285300context(" ds.dataFrameSort::expt_dgr::multiple::alphabetic::descending" )
286301test_that(' all datasets' ,
287302 {
@@ -307,6 +322,7 @@ test_that('all datasets',
307322 # .test.data.frame.sorting("D","FACTOR_CHARACTER",TRUE,"alphabetic","server.data",local.df.list)
308323 .test.data.frame.sorting(" D" ," CHARACTER" ,TRUE ," alphabetic" ," server.data" ,local.df.list )
309324 })
325+
310326context(" ds.dataFrameSort::expt_dgr::single::alphabetic::descending" )
311327test_that(' dataset 3' ,
312328 {
@@ -333,8 +349,14 @@ test_that('dataset 3',
333349 .test.data.frame.sorting(" D" ," CHARACTER" ,TRUE ," alphabetic" ," server.data" ,local.df.list )
334350 })
335351
352+ #
353+ # Shutdown
354+ #
336355
337356context(' ds.dataFrameSort::expt_dgr::shutdown' )
338357
358+ #
359+ # Done
360+ #
339361
340362context(' ds.dataFrameSort::expt_dgr::done' )
0 commit comments