Skip to content

Commit

Permalink
Clean up overly nested constructor calls in TaintAccessPathTreeTest
Browse files Browse the repository at this point in the history
Summary: As the title goes, this makes GCC confused.

Reviewed By: yuhshin-oss

Differential Revision: D60771024

fbshipit-source-id: 17cdc8d80486d4e762eaf143767c93c8012b474b
  • Loading branch information
jinghao-jia authored and facebook-github-bot committed Aug 5, 2024
1 parent 5819b10 commit 03fb7e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/tests/TaintAccessPathTreeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ TEST_F(TaintAccessPathTreeTest, Join) {

EXPECT_EQ(
tree1.read(Root(Root::Kind::Return)),
(TaintTree({{get_taint({"1"})}}, config_override1)));
(TaintTree(get_taint({"1"}), config_override1)));

// Join trees with different config overrides
TaintTreeConfigurationOverrides config_override2{
Expand All @@ -597,27 +597,27 @@ TEST_F(TaintAccessPathTreeTest, Join) {
tree1.join_with(tree2);
EXPECT_EQ(
tree1.read(Root(Root::Kind::Return)),
(TaintTree({{get_taint({"1", "2"})}}, config_override1)));
(TaintTree(get_taint({"1", "2"}), config_override1)));
// No config overrides for Argument(0) yet.
EXPECT_EQ(
tree1.read(AccessPath(Root(Root::Kind::Argument, 0), Path{x, y})),
(TaintTree({{get_taint({"3", "4"})}})));
(TaintTree(get_taint({"3", "4"}))));

tree1.join_with(tree2_override2);
// Config overrides for Return is the join of config_override1 and
// config_override2.
EXPECT_EQ(
tree1.read(Root(Root::Kind::Return)),
(TaintTree(
{{get_taint({"1", "2"})}},
get_taint({"1", "2"}),
TaintTreeConfigurationOverrides{
{TaintTreeConfigurationOverrideOptions::MaxModelHeight, 10},
{TaintTreeConfigurationOverrideOptions::MaxModelWidth, 7},
})));
// Config overrides for Argument(0) is config_override2
EXPECT_EQ(
tree1.read(AccessPath(Root(Root::Kind::Argument, 0), Path{x, y})),
(TaintTree({{get_taint({"3", "4"})}}, config_override2)));
(TaintTree(get_taint({"3", "4"}), config_override2)));
}

TEST_F(TaintAccessPathTreeTest, Elements) {
Expand Down

0 comments on commit 03fb7e5

Please sign in to comment.