MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/fluid/framework/scope_test.cc:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using paddle::framework::Variable;
27
28TEST(Scope, VarsShadowing) {
29 Scope s;
30 Scope& ss1 = s.NewScope();
31 Scope& ss2 = s.NewScope();
32
33 Variable* v0 = s.Var("a");
34 Variable* v1 = ss1.Var("a");
35
36 EXPECT_NE(v0, v1);
37
38 EXPECT_EQ(v0, s.FindVar("a"));
39 EXPECT_EQ(v1, ss1.FindVar("a"));
40 EXPECT_EQ(v0, ss2.FindVar("a"));
41}
42
43TEST(Scope, FindVar) {
44 Scope s;

Callers

nothing calls this directly

Calls 5

FindScopeMethod · 0.80
LocalVarNamesMethod · 0.80
c_strMethod · 0.80
VarMethod · 0.45
FindVarMethod · 0.45

Tested by

no test coverage detected