@@ -21,19 +21,18 @@ using namespace lldb;
21
21
using namespace lldb_private ;
22
22
23
23
class ProgressReportTest : public ::testing::Test {
24
- SubsystemRAII<FileSystem, HostInfo, PlatformMacOSX> subsystems;
25
-
26
- // The debugger's initialization function can't be called with no arguments
27
- // so calling it using SubsystemRAII will cause the test build to fail as
28
- // SubsystemRAII will call Initialize with no arguments. As such we set it up
29
- // here the usual way.
30
- void SetUp () override { Debugger::Initialize (nullptr ); }
31
- void TearDown () override { Debugger::Terminate (); }
24
+ SubsystemRAII<FileSystem, HostInfo, PlatformMacOSX> subsystems;
25
+
26
+ // The debugger's initialization function can't be called with no arguments
27
+ // so calling it using SubsystemRAII will cause the test build to fail as
28
+ // SubsystemRAII will call Initialize with no arguments. As such we set it up
29
+ // here the usual way.
30
+ void SetUp () override { Debugger::Initialize (nullptr ); }
31
+ void TearDown () override { Debugger::Terminate (); }
32
32
};
33
33
34
34
TEST_F (ProgressReportTest, TestReportCreation) {
35
35
std::chrono::milliseconds timeout (100 );
36
- const unsigned long long NO_TOTAL = 1 ;
37
36
38
37
// Set up the debugger, make sure that was done properly
39
38
ArchSpec arch (" x86_64-apple-macosx-" );
@@ -52,7 +51,7 @@ TEST_F(ProgressReportTest, TestReportCreation) {
52
51
listener_sp->StartListeningForEvents (&broadcaster,
53
52
Debugger::eBroadcastBitProgress);
54
53
EXPECT_TRUE (
55
- broadcaster.EventTypeHasListeners (Debugger::eBroadcastBitProgress));
54
+ broadcaster.EventTypeHasListeners (Debugger::eBroadcastBitProgress));
56
55
57
56
EventSP event_sp;
58
57
const ProgressEventData *data;
@@ -76,7 +75,7 @@ TEST_F(ProgressReportTest, TestReportCreation) {
76
75
ASSERT_EQ (data->GetDetails (), " Starting report 1" );
77
76
ASSERT_FALSE (data->IsFinite ());
78
77
ASSERT_FALSE (data->GetCompleted ());
79
- ASSERT_EQ (data->GetTotal (), NO_TOTAL );
78
+ ASSERT_EQ (data->GetTotal (), Progress:: kNonDeterministicTotal );
80
79
ASSERT_EQ (data->GetMessage (), " Progress report 1: Starting report 1" );
81
80
82
81
EXPECT_TRUE (listener_sp->GetEvent (event_sp, timeout));
@@ -85,15 +84,15 @@ TEST_F(ProgressReportTest, TestReportCreation) {
85
84
ASSERT_EQ (data->GetDetails (), " Starting report 2" );
86
85
ASSERT_FALSE (data->IsFinite ());
87
86
ASSERT_FALSE (data->GetCompleted ());
88
- ASSERT_EQ (data->GetTotal (), NO_TOTAL );
87
+ ASSERT_EQ (data->GetTotal (), Progress:: kNonDeterministicTotal );
89
88
ASSERT_EQ (data->GetMessage (), " Progress report 2: Starting report 2" );
90
89
91
90
EXPECT_TRUE (listener_sp->GetEvent (event_sp, timeout));
92
91
data = ProgressEventData::GetEventDataFromEvent (event_sp.get ());
93
92
ASSERT_EQ (data->GetDetails (), " Starting report 3" );
94
93
ASSERT_FALSE (data->IsFinite ());
95
94
ASSERT_FALSE (data->GetCompleted ());
96
- ASSERT_EQ (data->GetTotal (), NO_TOTAL );
95
+ ASSERT_EQ (data->GetTotal (), Progress:: kNonDeterministicTotal );
97
96
ASSERT_EQ (data->GetMessage (), " Progress report 3: Starting report 3" );
98
97
99
98
// Progress report objects should be destroyed at this point so
0 commit comments