1 /* 2 * grusstest.c 3 * 4 * Autor: H.Drachenfels 5 * Erstellt am: 25.7.2018 6 */
7
8 #include "gruss.h"
9 #include "systemuhr.h"
10 #include "testuhr.h"
11 #include <stdio.h>
12
13 int main(void)
14 {
15 uhr *s = new_systemuhr();
16 if (!s) return 1;
17 printf("%s\n", gruessen(s));
18
19 uhr *t = new_testuhr(); // Mock-Objekt
20 if (!t) return 1;
21
22 unsigned stunde, minute;
23 while (scanf("%u %u", &stunde, &minute) == 2)
24 {
25 testuhr_stellen(t, stunde, minute);
26 printf("%s\n", gruessen(t));
27 }
28
29 uhr_destruct(t);
30 uhr_destruct(s);
31
32 return 0;
33 }
34