Replace tabs with whitespaces (#6)

This commit is contained in:
Alexander Gama Espinosa 2019-10-29 13:50:05 -07:00 коммит произвёл GitHub
Родитель 3215488d35
Коммит ab3c235253
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 1555 добавлений и 1555 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -26,56 +26,56 @@ LogWriter logWriter;
namespace LogMonitorTests
{
///
/// Tests the tools that other tests could use. i.e. redirecting stdout.
///
TEST_CLASS(LogMonitorTests)
{
WCHAR bigOutBuf[BUFFER_SIZE];
///
/// Tests the tools that other tests could use. i.e. redirecting stdout.
///
TEST_CLASS(LogMonitorTests)
{
WCHAR bigOutBuf[BUFFER_SIZE];
///
/// Gets the content of the Stdout buffer and returns it in a wstring.
///
/// \return A wstring with the stdout.
///
std::wstring RecoverOuput()
{
return std::wstring(bigOutBuf);
}
///
/// Gets the content of the Stdout buffer and returns it in a wstring.
///
/// \return A wstring with the stdout.
///
std::wstring RecoverOuput()
{
return std::wstring(bigOutBuf);
}
public:
public:
///
/// "Redirects" the stdout to our buffer.
///
TEST_METHOD_INITIALIZE(InitializeLogFileMonitorTests)
{
//
// Set our own buffer in stdout.
//
ZeroMemory(bigOutBuf, sizeof(bigOutBuf));
fflush(stdout);
_setmode(_fileno(stdout), _O_U16TEXT);
setvbuf(stdout, (char*)bigOutBuf, _IOFBF, sizeof(bigOutBuf));
}
///
/// Test that things being printed with logWriter are sent to
/// bigOutBuf buffer.
///
TEST_METHOD(TestRedirectedOutputForTests)
{
std::wstring expectedOutput(BUFFER_SIZE - 4, L'#');
///
/// "Redirects" the stdout to our buffer.
///
TEST_METHOD_INITIALIZE(InitializeLogFileMonitorTests)
{
//
// Set our own buffer in stdout.
//
ZeroMemory(bigOutBuf, sizeof(bigOutBuf));
fflush(stdout);
_setmode(_fileno(stdout), _O_U16TEXT);
setvbuf(stdout, (char*)bigOutBuf, _IOFBF, sizeof(bigOutBuf));
}
///
/// Test that things being printed with logWriter are sent to
/// bigOutBuf buffer.
///
TEST_METHOD(TestRedirectedOutputForTests)
{
std::wstring expectedOutput(BUFFER_SIZE - 4, L'#');
logWriter.WriteConsoleLog(expectedOutput);
expectedOutput += L"\n";
logWriter.WriteConsoleLog(expectedOutput);
expectedOutput += L"\n";
//
// Recover the stdout
//
std::wstring realOutput = RecoverOuput();
//
// Recover the stdout
//
std::wstring realOutput = RecoverOuput();
Assert::AreEqual(expectedOutput, realOutput);
}
};
Assert::AreEqual(expectedOutput, realOutput);
}
};
}

Просмотреть файл

@ -81,7 +81,7 @@ ReadLogConfigObject(
return false;
}
bool sourcesTagFound = false;
bool sourcesTagFound = false;
if (Parser.BeginParseObject())
{
do
@ -97,7 +97,7 @@ ReadLogConfigObject(
continue;
}
sourcesTagFound = true;
sourcesTagFound = true;
if (!Parser.BeginParseArray())
{

Просмотреть файл

@ -32,8 +32,8 @@ private:
//
// Vectors used to store an EVENT_TRACE_PROPERTIES object.
//
std::vector<BYTE> m_vecEventTracePropsBuffer;
std::vector<BYTE> m_vecStopTracePropsBuffer;
std::vector<BYTE> m_vecEventTracePropsBuffer;
std::vector<BYTE> m_vecStopTracePropsBuffer;
//
// Signaled by destructor to request the spawned thread to stop.