1 /* Sample code to test network codes decoding */
8 #include "../libgammu/gsmphones.h"
10 int single_test(const char *string
, const char *expected
)
13 ret
= GSM_GetNetworkName(string
);
14 if (strcmp(DecodeUnicodeConsole(ret
), expected
) != 0) {
15 printf("Result %s did not match %s\n", DecodeUnicodeConsole(ret
), expected
);
21 int main(int argc
, char **argv
)
25 rc
|= single_test("247 01", "LMT");
26 rc
|= single_test("24701", "LMT");
27 rc
|= single_test("99999", "GammuTel");
28 rc
|= single_test("00000", "unknown");
33 /* Editor configuration
34 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: