| 68 | }; |
| 69 | |
| 70 | TEST_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 | |
| 89 | TEST_F(PredictorTest, TestTwoSentences) { |
| 90 | std::vector<PredictorResponse> predictions; |
nothing calls this directly
no test coverage detected