MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/util/example_proto_fast_parsing_test.cc:77–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75// }
76
77TEST(FastParse, IgnoresPrecedingUnknownTopLevelFields) {
78 ExampleWithExtras example;
79 (*example.mutable_features()->mutable_feature())["age"]
80 .mutable_int64_list()
81 ->add_value(13);
82 example.set_extra1("some_str");
83 example.set_extra2(123);
84 example.set_extra3(234);
85 example.set_extra4(345);
86 example.set_extra5(4.56);
87 example.add_extra6(5.67);
88 example.add_extra6(6.78);
89 (*example.mutable_extra7()->mutable_feature())["extra7"]
90 .mutable_int64_list()
91 ->add_value(1337);
92
93 Example context;
94 (*context.mutable_features()->mutable_feature())["zipcode"]
95 .mutable_int64_list()
96 ->add_value(94043);
97
98 TestCorrectness(strings::StrCat(Serialize(example), Serialize(context)));
99}
100
101TEST(FastParse, IgnoresTrailingUnknownTopLevelFields) {
102 Example example;

Callers

nothing calls this directly

Calls 15

TestCorrectnessFunction · 0.85
SerializeFunction · 0.85
TestCorrectnessJsonFunction · 0.85
ExampleWithSomeFeaturesFunction · 0.85
AddDenseFeatureFunction · 0.85
AddSparseFeatureFunction · 0.85
FastParseExampleFunction · 0.85
FastParseSingleExampleFunction · 0.85
FuzzFunction · 0.85
StrCatFunction · 0.50
ParseFromStringMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected