class MockConsole

Defined at line 17 of file ../../src/developer/debug/zxdb/console/mock_console.h

Public Methods

void MockConsole (Session * session)

Defined at line 35 of file ../../src/developer/debug/zxdb/console/mock_console.h

void ~MockConsole ()

Defined at line 36 of file ../../src/developer/debug/zxdb/console/mock_console.h

const OutputBuffer & output_buffer ()

Defined at line 38 of file ../../src/developer/debug/zxdb/console/mock_console.h

OutputEvent GetOutputEvent ()

Gets an output event that was the result of one call to Output() or Clear() on this console.

Output events will be returned in first-in, first-out order.

If the event's type field is Type::kOutput, there was an Output() call, and the output field

contains the value it was given. If the event's type field is Type::kClear, there was a call to

Clear() and the output field is invalid. If the event's type field is Type::kQuitEarly,

something interrupted the loop while we were waiting for a call.

If no call has happened recently, the message loop will be run until we receive a call or some

outside actor causes it to quit.

Defined at line 38 of file ../../src/developer/debug/zxdb/console/mock_console.cc

Session * session ()

Defined at line 39 of file ../../src/developer/debug/zxdb/console/mock_console.h

fxl::ObserverList<OutputObserver> & output_observers ()

Defined at line 40 of file ../../src/developer/debug/zxdb/console/mock_console.h

bool HasOutputEvent ()

Returns true if there are any output events waiting to be read.

Defined at line 43 of file ../../src/developer/debug/zxdb/console/mock_console.h

void FlushOutputEvents ()

Clear any pending output events. That haven't yet been retrieved by

GetOutputEvent();

Defined at line 57 of file ../../src/developer/debug/zxdb/console/mock_console.cc

bool SendModalReply (const std::string & line)

Completes a pending modal request with the given input. Returns true if it was called, false if

there was no pending modal request (tests will want to validate this returned true).

This doesn't do validity checking that the input line matches one of the options, unlike the

real code path. Tests will want to be careful about sending the right type of input.

Defined at line 59 of file ../../src/developer/debug/zxdb/console/mock_console.cc

void Clear ()

Defined at line 28 of file ../../src/developer/debug/zxdb/console/mock_console.cc

void Write (const OutputBuffer & output, bool add_newline)

Defined at line 15 of file ../../src/developer/debug/zxdb/console/mock_console.cc

bool has_quit ()

Set to true when Quit() is called.

Defined at line 62 of file ../../src/developer/debug/zxdb/console/mock_console.h

void ModalGetOption (const line_input::ModalPromptOptions & options, OutputBuffer message, const std::string & prompt, line_input::ModalLineInput::ModalCompletionCallback cb)

Defined at line 69 of file ../../src/developer/debug/zxdb/console/mock_console.cc

void Init ()

Console implementation.

Defined at line 72 of file ../../src/developer/debug/zxdb/console/mock_console.h

void Quit ()

Defined at line 73 of file ../../src/developer/debug/zxdb/console/mock_console.h

void ProcessInputLine (const std::string & line, fxl::RefPtr<CommandContext> cmd_context, bool add_to_history)

Defined at line 81 of file ../../src/developer/debug/zxdb/console/mock_console.cc

void EnableInput ()

Defined at line 85 of file ../../src/developer/debug/zxdb/console/mock_console.h

void DisableInput ()

Defined at line 86 of file ../../src/developer/debug/zxdb/console/mock_console.h

void ProcessInputLine (const std::string & line, OfflineCommandContext::CompletionCallback cb)

Overrider that uses an OfflineCommandContext by default.

Defined at line 104 of file ../../src/developer/debug/zxdb/console/mock_console.cc

Records