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

Function TEST_F

tensorflow/lite/models/smartreply/predictor_test.cc:70–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70TEST_F(PredictorTest, GetSegmentPredictions) {
71 std::vector<PredictorResponse> predictions;
72
73 GetSegmentPredictions({"Welcome"}, *model_, /*config=*/{{}}, &predictions);
74 EXPECT_GT(predictions.size(), 0);
75
76 float max = 0;
77 for (const auto &item : predictions) {
78 if (item.GetScore() > max) {
79 max = item.GetScore();
80 }
81 }
82
83 EXPECT_GT(max, 0.3);
84 EXPECT_THAT(
85 &predictions,
86 IncludeAnyResponesIn(std::unordered_set<string>({"Thanks very much"})));
87}
88
89TEST_F(PredictorTest, TestTwoSentences) {
90 std::vector<PredictorResponse> predictions;

Callers

nothing calls this directly

Calls 7

GetSegmentPredictionsFunction · 0.85
GetSamplesFilePathFunction · 0.85
GetScoreMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected