~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to camel/tests/misc/split.c

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
        camel_test_init (argc, argv);
60
60
 
61
 
        camel_test_start("Search splitting");
 
61
        camel_test_start ("Search splitting");
62
62
 
63
63
        for (i = 0; i < G_N_ELEMENTS (split_tests); i++) {
64
 
                camel_test_push("split %d '%s'", i, split_tests[i].word);
 
64
                camel_test_push ("split %d '%s'", i, split_tests[i].word);
65
65
 
66
66
                words = camel_search_words_split (split_tests[i].word);
67
67
                check (words != NULL);
68
 
                check_msg(words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
 
68
                check_msg (words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
69
69
 
70
70
                for (j = 0; j < words->len; j++) {
71
 
                        check_msg (strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
72
 
                                  "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
 
71
                        check_msg (
 
72
                                strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
 
73
                                "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
73
74
                        check (split_tests[i].splits[j].type == words->words[j]->type);
74
75
                }
75
76
 
79
80
 
80
81
        camel_test_end ();
81
82
 
82
 
        camel_test_start("Search splitting - simple");
 
83
        camel_test_start ("Search splitting - simple");
83
84
 
84
85
        for (i = 0; i < G_N_ELEMENTS (simple_tests); i++) {
85
 
                camel_test_push("simple split %d '%s'", i, simple_tests[i].word);
 
86
                camel_test_push ("simple split %d '%s'", i, simple_tests[i].word);
86
87
 
87
88
                tmp = camel_search_words_split (simple_tests[i].word);
88
89
                check (tmp != NULL);
89
90
 
90
91
                words = camel_search_words_simple (tmp);
91
92
                check (words != NULL);
92
 
                check_msg(words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
 
93
                check_msg (words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
93
94
 
94
95
                for (j = 0; j < words->len; j++) {
95
 
                        check_msg (strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
96
 
                                  "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
 
96
                        check_msg (
 
97
                                strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
 
98
                                "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
97
99
                        check (simple_tests[i].splits[j].type == words->words[j]->type);
98
100
                }
99
101