|
@@ -1,6 +1,7 @@
|
1
|
1
|
#include "tsfuncs.h"
|
2
|
2
|
|
3
|
3
|
#define NOW 1234567890
|
|
4
|
+#define NOW2 1000000000
|
4
|
5
|
|
5
|
6
|
void ts_pat_test() {
|
6
|
7
|
struct ts_pat *pat = ts_pat_alloc_init(0x7878);
|
|
@@ -27,6 +28,25 @@ void ts_pat_test() {
|
27
|
28
|
ts_pat_free(&pat);
|
28
|
29
|
}
|
29
|
30
|
|
|
31
|
+int ts_tdt_tot_test() {
|
|
32
|
+ struct ts_tdt *tdt = ts_tdt_alloc_init(NOW);
|
|
33
|
+ struct ts_tdt *tot = ts_tot_alloc_init(time(NULL));
|
|
34
|
+
|
|
35
|
+ ts_tdt_dump(tdt);
|
|
36
|
+ ts_tdt_dump(tot);
|
|
37
|
+
|
|
38
|
+ ts_tdt_set_time(tdt, NOW2);
|
|
39
|
+ ts_tdt_dump(tdt);
|
|
40
|
+
|
|
41
|
+ ts_tot_set_localtime_offset_sofia(tot);
|
|
42
|
+ ts_tdt_dump(tot);
|
|
43
|
+
|
|
44
|
+ ts_tdt_free(&tdt);
|
|
45
|
+ ts_tdt_free(&tot);
|
|
46
|
+
|
|
47
|
+ return 0;
|
|
48
|
+}
|
|
49
|
+
|
30
|
50
|
int ts_sdt_test() {
|
31
|
51
|
struct ts_sdt *sdt = ts_sdt_alloc_init(1, 2);
|
32
|
52
|
|
|
@@ -109,6 +129,7 @@ void ts_eit_test() {
|
109
|
129
|
|
110
|
130
|
int main() {
|
111
|
131
|
ts_pat_test();
|
|
132
|
+ ts_tdt_tot_test();
|
112
|
133
|
ts_sdt_test();
|
113
|
134
|
ts_eit_test();
|
114
|
135
|
return 0;
|