Skip to content

Commit

Permalink
[tests] fix tests running under ASAN and compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
loganek committed May 5, 2018
1 parent 8009416 commit f8a2491
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/lib/test_task_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestTaskScheduler : public ::testing::Test
ht_task_scheduler_init(&_scheduler);
}

void TearDown()
void TearDown() override
{
ht_task_scheduler_deinit(&_scheduler);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/test_timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ TEST_F(TestTimeline, ThreadSafeMessageShouldWorkWithMultipleThreads)
ht_timeline_register_listener(&timeline, test_listener<HT_Event>, &info);

// Act
std::thread th = std::thread([&timeline, event_count] {
std::thread th = std::thread([&timeline] {
for (size_t i = event_count / 2; i < event_count; i++)
{
HT_DECL_EVENT(HT_Event, event);
Expand Down
4 changes: 2 additions & 2 deletions tests/parser/test_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ TEST_F(TestEvent, ValidateSetValueMethod)
TEST_F(TestEvent, SetTimestampValueShouldUpdateTimestampField)
{
// Arrange
auto timestamp_field = std::make_shared<EventKlassField>("timestamp", "field_type", FieldTypeId::UINT64);
Event event(_klass);
FieldType value{};
value.f_UINT64 = 987;
auto timestamp_field = std::make_shared<EventKlassField>("timestamp", "field_type", FieldTypeId::UINT64);

// Act
event.set_value(timestamp_field.get(), value);
Expand Down Expand Up @@ -128,8 +128,8 @@ TEST_F(TestEvent, CopyEventWithNullStringShouldSetFieldValueToNull)
TEST_F(TestEvent, CopyEventWithNullEventShouldSetFieldValueToNull)
{
// Arrange
Event event(_klass);
auto field = std::make_shared<EventKlassField>("base_field3", "klass_name", FieldTypeId::STRUCT);
Event event(_klass);
event.set_value<Event*>(field.get(), nullptr);

// Act
Expand Down

0 comments on commit f8a2491

Please sign in to comment.