| 23 | namespace embedx { |
| 24 | |
| 25 | class DeepSamplerSourceTest : public ::testing::Test { |
| 26 | protected: |
| 27 | DeepConfig config_; |
| 28 | std::unique_ptr<DeepData> deep_data_; |
| 29 | std::unique_ptr<SamplerSource> sampler_source_; |
| 30 | |
| 31 | protected: |
| 32 | const std::string FREQ_FILE = "testdata/user_item_freq"; |
| 33 | const std::string NODE_CONFIG = "testdata/user_item_config"; |
| 34 | |
| 35 | protected: |
| 36 | void SetUp() override { |
| 37 | config_.set_node_config(NODE_CONFIG); |
| 38 | config_.set_freq_file(FREQ_FILE); |
| 39 | deep_data_ = DeepData::Create(config_); |
| 40 | EXPECT_TRUE(deep_data_ != nullptr); |
| 41 | sampler_source_ = NewDeepSamplerSource(deep_data_.get()); |
| 42 | EXPECT_TRUE(sampler_source_ != nullptr); |
| 43 | } |
| 44 | }; |
| 45 | |
| 46 | TEST_F(DeepSamplerSourceTest, Implemented) { |
| 47 | EXPECT_EQ(sampler_source_->ns_size(), 2); |
nothing calls this directly
no outgoing calls
no test coverage detected