Browse Source

Split TDT and TOT tests

Georgi Chorbadzhiyski 9 years ago
parent
commit
7f66c57e46
1 changed files with 19 additions and 11 deletions
  1. 19
    11
      tstest.c

+ 19
- 11
tstest.c View File

@@ -28,23 +28,30 @@ void ts_pat_test() {
28 28
 	ts_pat_free(&pat);
29 29
 }
30 30
 
31
-int ts_tdt_tot_test() {
31
+void ts_tdt_test() {
32 32
 	struct ts_tdt *tdt = ts_tdt_alloc_init(NOW);
33
-	struct ts_tdt *tot = ts_tot_alloc_init(time(NULL));
34
-
35 33
 	ts_tdt_dump(tdt);
36
-	ts_tdt_dump(tot);
37
-
38 34
 	ts_tdt_set_time(tdt, NOW2);
39 35
 	ts_tdt_dump(tdt);
40
-
41
-	ts_tot_set_localtime_offset_sofia(tot);
42
-	ts_tdt_dump(tot);
43
-
44 36
 	ts_tdt_free(&tdt);
37
+}
38
+
39
+void ts_tot_test() {
40
+	struct ts_tdt *tot;
41
+
42
+	tot = ts_tot_alloc_init(NOW);
43
+	ts_tdt_dump(tot);
45 44
 	ts_tdt_free(&tot);
46 45
 
47
-	return 0;
46
+	tot = ts_tot_alloc_init(NOW);
47
+	ts_tot_set_localtime_offset_sofia(tot, NOW);
48
+	ts_tdt_dump(tot);
49
+	ts_tdt_free(&tot);
50
+
51
+	tot = ts_tot_alloc_init(NOW2);
52
+	ts_tot_set_localtime_offset_sofia(tot, NOW2);
53
+	ts_tdt_dump(tot);
54
+	ts_tdt_free(&tot);
48 55
 }
49 56
 
50 57
 int ts_sdt_test() {
@@ -129,7 +136,8 @@ void ts_eit_test() {
129 136
 
130 137
 int main() {
131 138
 	ts_pat_test();
132
-	ts_tdt_tot_test();
139
+	ts_tdt_test();
140
+	ts_tot_test();
133 141
 	ts_sdt_test();
134 142
 	ts_eit_test();
135 143
 	return 0;

Loading…
Cancel
Save