Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rvinaybharadwaj committed Sep 6, 2024
1 parent 3a626b5 commit 013f53d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
7 changes: 3 additions & 4 deletions tests/feeder/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class ETFeederTest : public ::testing::Test {
trace = new Chakra::ETFeeder(filename);
}

virtual void TearDown() {
delete trace;
}
virtual void TearDown() { delete trace; }

Chakra::ETFeeder* trace;
};
Expand Down Expand Up @@ -67,7 +65,8 @@ TEST_F(ETFeederTest, RemoveTest) {
try {
node = trace->lookupNode(216);
ASSERT_TRUE(false) << "node should be removed \n";
} catch (const std::exception& e) {
}
catch (const std::exception & e) {
// this is the desired behaviour
}
freopen("/dev/tty", "w", stderr);
Expand Down
20 changes: 7 additions & 13 deletions tests/feeder/wrapperTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ class WrapperNodeTest : public ::testing::Test {
WrapperNodeTest() {}
virtual ~WrapperNodeTest() {}

void SetUp(const std::string& filename) {
node.createWrapper(filename);
}
void SetUp(const std::string& filename) { node.createWrapper(filename); }

virtual void TearDown() {
node.releaseMemory();
}
virtual void TearDown() { node.releaseMemory(); }

WrapperNode node;
};
Expand Down Expand Up @@ -55,8 +51,7 @@ TEST_F(WrapperNodeTest, ConstructorWrapperNodeTest) {
ASSERT_EQ(children[0]->id(), 217);
ASSERT_EQ(children[1]->id(), 430);
ASSERT_EQ(children[2]->id(), 435);
}
else if (ext == "json") {
} else if (ext == "json") {
std::vector<JSONNode> children;
node.getChildren(children);
ASSERT_EQ(children[0].id(), 217);
Expand All @@ -75,7 +70,8 @@ TEST_F(WrapperNodeTest, RemoveTest) {
try {
node.lookupNode(216);
ASSERT_TRUE(false) << "node should be removed \n";
} catch (const std::exception& e) {
}
catch (const std::exception & e) {
// this is the desired behaviour
}
freopen("/dev/tty", "w", stderr);
Expand Down Expand Up @@ -138,8 +134,7 @@ TEST_F(WrapperNodeTest, AddNodeTest) {
node.lookupNode(216);
pnode2 = node.getProtobufNode();
ASSERT_EQ(pnode2->id(), 216);
}
else if (ext == "json") {
} else if (ext == "json") {
JSON jnode1;
node.lookupNode(216);
jnode1 = node.getJSONNode();
Expand All @@ -163,8 +158,7 @@ TEST_F(WrapperNodeTest, NodeGetChildrenTest) {
node.getChildren(children);
ASSERT_EQ(children[0]->id(), 217);
ASSERT_EQ(children[2]->id(), 435);
}
else if (ext == "json") {
} else if (ext == "json") {
std::vector<JSONNode> children;
node.getChildren(children);
ASSERT_EQ(children[0].id(), 217);
Expand Down

0 comments on commit 013f53d

Please sign in to comment.