Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / liblouis / src / tests / outpos.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <stdlib.h>
4 #include "brl_checks.h"
5
6 int
7 main(int argc, char **argv)
8 {
9   const char* table = "en-us-g1.ctb";
10   int result = 0;
11
12   /* One input maps to one output. */
13   const char* str1 = "ab";
14   const int expected_outpos1[] = {0, 1};
15   result |= check_outpos(table, str1, expected_outpos1);
16
17   /* One input maps to two output. */
18   const char* str2 = "1";
19   const int expected_outpos2[] = {1};
20   result |= check_outpos(table, str2, expected_outpos2);
21
22   /* Similar to test 2, but multiple input. */
23   const char* str3 = "1 2";
24   const int expected_outpos3[] = {1, 2, 4};
25   result |= check_outpos(table, str3, expected_outpos3);
26   const char* str4 = "1 2 3";
27   const int expected_outpos4[] = {1, 2, 4, 5, 7};
28   result |= check_outpos(table, str4, expected_outpos4);
29
30   return result;
31 }