| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
> |
| 7 |
|
| 8 |
|
| 9 |
#include "cbd-test.h" |
| 10 |
|
| 11 |
const CbdChannelsRange expected_de[] = { |
| 12 |
{ |
| 13 |
.level = LCB_SEVERITY_LEVEL_PRESIDENTIAL, |
| 14 |
.start = 4370, |
| 15 |
.end = 4370, |
| 16 |
}, |
| 17 |
{ |
| 18 |
.level = LCB_SEVERITY_LEVEL_EXTREME, |
| 19 |
.start = 4371, |
| 20 |
.end = 4371, |
| 21 |
}, |
| 22 |
{ |
| 23 |
.level = LCB_SEVERITY_LEVEL_EXTREME, |
| 24 |
.start = 4384, |
| 25 |
.end = 4385, |
| 26 |
}, |
| 27 |
{ |
| 28 |
.level = LCB_SEVERITY_LEVEL_SEVERE, |
| 29 |
.start = 4373, |
| 30 |
.end = 4377, |
| 31 |
}, |
| 32 |
{ |
| 33 |
.level = LCB_SEVERITY_LEVEL_SEVERE, |
| 34 |
.start = 4378, |
| 35 |
.end = 4378, |
| 36 |
}, |
| 37 |
{ |
| 38 |
.level = LCB_SEVERITY_LEVEL_SEVERE, |
| 39 |
.start = 4386, |
| 40 |
.end = 4391, |
| 41 |
}, |
| 42 |
{ |
| 43 |
.level = LCB_SEVERITY_LEVEL_PUBLIC_SAFETY, |
| 44 |
.start = 4396, |
| 45 |
.end = 4396, |
| 46 |
}, |
| 47 |
{ |
| 48 |
.level = LCB_SEVERITY_LEVEL_AMBER, |
| 49 |
.start = 4379, |
| 50 |
.end = 4379, |
| 51 |
}, |
| 52 |
{ |
| 53 |
.level = LCB_SEVERITY_LEVEL_TEST, |
| 54 |
.start = 4380, |
| 55 |
.end = 4380, |
| 56 |
}, |
| 57 |
{ |
| 58 |
.level = LCB_SEVERITY_LEVEL_TEST, |
| 59 |
.start = 4381, |
| 60 |
.end = 4381, |
| 61 |
}, |
| 62 |
{ |
| 63 |
.level = LCB_SEVERITY_LEVEL_TEST, |
| 64 |
.start = 4382, |
| 65 |
.end = 4382, |
| 66 |
}, |
| 67 |
}; |
| 68 |
|
| 69 |
|
| 70 |
const CbdChannelsRange expected_us[] = { |
| 71 |
{ |
| 72 |
.level = LCB_SEVERITY_LEVEL_PRESIDENTIAL, |
| 73 |
.start = 4370, |
| 74 |
.end = 4370, |
| 75 |
}, |
| 76 |
{ |
| 77 |
.level = LCB_SEVERITY_LEVEL_EXTREME, |
| 78 |
.start = 4371, |
| 79 |
.end = 4372, |
| 80 |
}, |
| 81 |
{ |
| 82 |
.level = LCB_SEVERITY_LEVEL_SEVERE, |
| 83 |
.start = 4373, |
| 84 |
.end = 4378, |
| 85 |
}, |
| 86 |
{ |
| 87 |
.level = LCB_SEVERITY_LEVEL_PUBLIC_SAFETY, |
| 88 |
.start = 4397, |
| 89 |
.end = 4397, |
| 90 |
}, |
| 91 |
{ |
| 92 |
.level = LCB_SEVERITY_LEVEL_AMBER, |
| 93 |
.start = 4379, |
| 94 |
.end = 4379, |
| 95 |
}, |
| 96 |
}; |
| 97 |
|
| 98 |
|
| 99 |
GArray * |
| 100 |
cbd_test_channels_get_expected (const char *country) |
| 101 |
{ |
| 102 |
g_assert_nonnull (country); |
| 103 |
|
| 104 |
if (g_str_equal (country, "de")) { |
| 105 |
return g_array_new_take (g_memdup2 (expected_de, sizeof (expected_de)), |
| 106 |
G_N_ELEMENTS (expected_de), |
| 107 |
FALSE, |
| 108 |
sizeof (CbdChannelsRange)); |
| 109 |
} else if (g_str_equal (country , "us")) { |
| 110 |
return g_array_new_take (g_memdup2 (expected_us, sizeof (expected_us)), |
| 111 |
G_N_ELEMENTS (expected_us), |
| 112 |
FALSE, |
| 113 |
sizeof (CbdChannelsRange)); |
| 114 |
} else { |
| 115 |
g_assert_not_reached(); |
| 116 |
} |
| 117 |
} |