-
Notifications
You must be signed in to change notification settings - Fork 23
/
test-expt-ds.dataFrame.R
108 lines (94 loc) · 4.66 KB
/
test-expt-ds.dataFrame.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
context('ds.dataFrame::expt::setup')
source('connection_to_datasets/init_testing_datasets.R')
source('definition_tests/def-ds.data.frame.R')
context('ds.dataFrame::expt::one_column::single')
test_that('numeric data',
{
connect.dataset.2()
.test.data.frame.creation(c('D$NUMERIC'),'numeric_1_df')
.test.data.frame.creation(c('D$NON_NEGATIVE_NUMERIC'),'numeric_2_df')
.test.data.frame.creation(c('D$POSITIVE_NUMERIC'),'numeric_3_df')
.test.data.frame.creation(c('D$NEGATIVE_NUMERIC'),'numeric_4_df')
.test.data.frame.creation(c('D$INTEGER'),'integer_df')
.test.data.frame.creation(c('D$NON_NEGATIVE_INTEGER'),'integer_5_df')
.test.data.frame.creation(c('D$POSITIVE_INTEGER'),'integer_6_df')
.test.data.frame.creation(c('D$NEGATIVE_INTEGER'),'integer_7_df')
})
context('ds.dataFrame::expt::several_columns::single')
test_that('numeric data',
{
connect.dataset.2()
.test.data.frame.creation(c('D$NUMERIC','D$NON_NEGATIVE_NUMERIC','D$POSITIVE_NUMERIC','D$NEGATIVE_NUMERIC'),'numeric_8_df')
.test.data.frame.creation(c('D$INTEGER','D$NON_NEGATIVE_INTEGER','D$POSITIVE_INTEGER','D$NEGATIVE_INTEGER'),'integer_9_df')
})
context('ds.dataFrame::expt::one_column::multiple')
test_that('numeric data',
{
connect.all.datasets()
.test.data.frame.creation(c('D$NUMERIC'),'numeric_9_df')
.test.data.frame.creation(c('D$NON_NEGATIVE_NUMERIC'),'numeric_10_df')
.test.data.frame.creation(c('D$POSITIVE_NUMERIC'),'numeric_11_df')
.test.data.frame.creation(c('D$NEGATIVE_NUMERIC'),'numeric_12_df')
.test.data.frame.creation(c('D$INTEGER'),'integer_13_df')
.test.data.frame.creation(c('D$NON_NEGATIVE_INTEGER'),'integer_14_df')
.test.data.frame.creation(c('D$POSITIVE_INTEGER'),'integer_15_df')
.test.data.frame.creation(c('D$NEGATIVE_INTEGER'),'integer_16_df')
})
context('ds.dataFrame::expt::several_columns::single')
test_that('numeric data',
{
connect.all.datasets()
.test.data.frame.creation(c('D$NUMERIC','D$NON_NEGATIVE_NUMERIC','D$POSITIVE_NUMERIC','D$NEGATIVE_NUMERIC'),'numeric_17_df')
.test.data.frame.creation(c('D$INTEGER','D$NON_NEGATIVE_INTEGER','D$POSITIVE_INTEGER','D$NEGATIVE_INTEGER'),'integer_17_df')
})
context('ds.dataFrame::expt::one_column_from_objects::single')
test_that('numeric data',
{
connect.dataset.2()
.test.data.frame.from.objects('D$NUMERIC','numeric_created' ,'numeric_19_df')
.test.data.frame.from.objects('D$NON_NEGATIVE_NUMERIC','numeric_created' ,'numeric_20_df')
.test.data.frame.from.objects('D$POSITIVE_NUMERIC','numeric_created' ,'numeric_21_df')
.test.data.frame.from.objects('D$NEGATIVE_NUMERIC','numeric_created' ,'numeric_22_df')
.test.data.frame.from.objects('D$INTEGER','numeric_created','numeric_23_df')
.test.data.frame.from.objects('D$NON_NEGATIVE_INTEGER','numeric_created','numeri_25c_df')
.test.data.frame.from.objects('D$POSITIVE_INTEGER','numeric_created','numeric_26_df')
.test.data.frame.from.objects('D$NEGATIVE_INTEGER','numeric_created','numeric_27_df')
})
context('ds.dataFrame::expt::object::multiple')
test_that('numeric data',
{
connect.all.datasets()
.test.data.frame.from.objects('D$NUMERIC','numeric_created' ,'numeric_28_df')
.test.data.frame.from.objects('D$NON_NEGATIVE_NUMERIC','numeric_created' ,'numeric_29_df')
.test.data.frame.from.objects('D$POSITIVE_NUMERIC','numeric_created' ,'numeric_30_df')
.test.data.frame.from.objects('D$NEGATIVE_NUMERIC','numeric_created' ,'numeric_31_df')
.test.data.frame.from.objects('D$INTEGER','numeric_created','numeric_32_df')
.test.data.frame.from.objects('D$NON_NEGATIVE_INTEGER','numeric_created','numeric_33_df')
.test.data.frame.from.objects('D$POSITIVE_INTEGER','numeric_created','numeric_34_df')
.test.data.frame.from.objects('D$NEGATIVE_INTEGER','numeric_created','numeric_35_df')
})
context('ds.dataFrame::expt::several_objects::multiple')
test_that('several objects',
{
connect.all.datasets()
.test.data.frame.from.different.objects('multiple_df')
})
context('ds.dataFrame::expt::non_numeric::multiple')
test_that("non_numeric",
{
connect.all.datasets()
.test.data.frame.creation(c('D$CHARACTER'),'character_df')
.test.data.frame.creation(c('D$LOGICAL'),'boolean_df')
.test.data.frame.from.objects('D$CHARACTER','character_created' ,'character_df')
.test.data.frame.from.objects('D$LOGICAL','boolean_created' ,'boolean_df')
})
context('ds.dataFrame::expt::non_numeric::multiple')
{
connect.dataset.2()
.test.data.frame.creation(c('D$CHARACTER'),'character_df')
.test.data.frame.creation(c('D$LOGICAL'),'boolean_df')
.test.data.frame.from.objects('D$CHARACTER','character_created' ,'character_df')
.test.data.frame.from.objects('D$LOGICAL','boolean_created' ,'boolean_df')
}
context('ds.dataFrame::expt::shutdown')
context('ds.dataFrame::expt::done')