Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 969cd83

Browse files
committed
Cleanup of source_clang_test
1 parent f2ed3b1 commit 969cd83

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tests/source_clang_test.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,55 +32,44 @@ int main() {
3232

3333
//test get_declaration and get_implementation
3434
clang_view->place_cursor_at_line_index(14-1, 8-1);
35-
flush_events();
3635
auto location=clang_view->get_declaration_location({clang_view});
3736
g_assert_cmpuint(location.line, ==, 5);
3837

3938
clang_view->place_cursor_at_line_index(location.line-1, location.index-1);
40-
flush_events();
4139
location=clang_view->get_implementation_location({clang_view});
4240
g_assert_cmpuint(location.line, ==, 10);
4341

4442
clang_view->place_cursor_at_line_index(location.line-1, location.index-1);
45-
flush_events();
4643
location=clang_view->get_declaration_location({clang_view});
4744
g_assert_cmpuint(location.line, ==, 5);
4845

4946
//test get_usages and get_methods
5047
auto locations=clang_view->get_usages({clang_view});
51-
flush_events();
5248
g_assert_cmpuint(locations.size(), >, 0);
5349

5450
locations=clang_view->get_methods();
55-
flush_events();
5651
g_assert_cmpuint(locations.size(), >, 0);
5752

5853
//Test rename class (error if not constructor and destructor is renamed as well)
5954
auto saved_main=clang_view->get_buffer()->get_text();
6055
clang_view->place_cursor_at_line_index(1-1, 7-1);
61-
flush_events();
6256
auto token=clang_view->get_token(clang_view->get_buffer()->get_insert()->get_iter());
6357
g_assert_cmpstr(token.c_str(), ==, "TestClass");
6458
location=clang_view->get_declaration_location({clang_view});
6559
g_assert_cmpuint(location.line, ==, 1);
6660
clang_view->rename_similar_tokens({clang_view}, "RenamedTestClass");
67-
flush_events();
6861
while(!clang_view->parsed)
6962
flush_events();
70-
flush_events();
7163
auto iter=clang_view->get_buffer()->get_insert()->get_iter();
7264
iter.backward_char();
7365
token=clang_view->get_token(iter);
7466
g_assert_cmpstr(token.c_str(), ==, "RenamedTestClass");
75-
flush_events();
7667
g_assert_cmpuint(clang_view->diagnostics.size(), ==, 0);
7768
clang_view->get_buffer()->set_text(saved_main);
78-
flush_events();
7969
clang_view->save({clang_view});
8070

8171
//test error
8272
clang_view->get_buffer()->set_text(main_error);
83-
flush_events();
8473
while(!clang_view->parsed)
8574
flush_events();
8675
g_assert_cmpuint(clang_view->diagnostics.size(), >, 0);

0 commit comments

Comments
 (0)