MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / LogTest

Class LogTest

runtime/LogTest.cc:71–111  ·  view source on GitHub ↗

The fixture for testing class Foo.

Source from the content-addressed store, hash-verified

69
70// The fixture for testing class Foo.
71class LogTest : public ::testing::Test {
72protected:
73// Note, if the tests ever fail to compile due to these symbols not being
74// found, it's most likely that someone updated the testHelper/main.cc file.
75// In this case, check testHelper/GeneratedCode.cc for updated values and
76// change the declarations above and uses below to match.
77int noParamsId = __fmtId__Simple32log32message32with32032parameters__testHelper47client46cc__20__;
78int stringParamId = __fmtId__This32is32a32string3237s__testHelper47client46cc__21__;
79
80int integerParamId = __fmtId__I32have32an32integer3237d__testHelper47client46cc__28__;
81int uint64_tParamId = __fmtId__I32have32a32uint6495t3237lu__testHelper47client46cc__29__;
82int doubleParamId = __fmtId__I32have32a32double3237lf__testHelper47client46cc__30__;
83int mixParamId = __fmtId__I32have32a32couple32of32things3237d443237f443237u443237s__testHelper47client46cc__31__;
84LogTest()
85{
86 char dictionary[4096];
87 dictionaryBytes = GeneratedFunctions::writeDictionary(dictionary,
88 dictionary + sizeof(dictionary));
89 assert(dictionaryBytes > 0);
90}
91
92virtual ~LogTest() {
93}
94
95// If the constructor and destructor are not enough for setting up
96// and cleaning up each test, you can define the following methods:
97
98virtual void SetUp() {
99 // Code here will be called immediately after the constructor (right
100 // before each test).
101}
102
103virtual void TearDown() {
104// Code here will be called immediately after each test (right
105// before the destructor).
106}
107
108// Objects declared here can be used by all tests in the test case for Foo.
109
110uint32_t dictionaryBytes;
111};
112
113TEST_F(LogTest, maxSizeOfHeader) {
114 char buffer[100];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected