| 229 | } |
| 230 | |
| 231 | void exec5(const std::string& where, size_t expKeep) |
| 232 | { |
| 233 | StageFactory factory; |
| 234 | |
| 235 | Stage *r = factory.createStage("readers.faux"); |
| 236 | Options ro; |
| 237 | ro.add("count", 100u); |
| 238 | ro.add("bounds", BOX3D(0, 0, 100, 99, 9.9, 199)); |
| 239 | ro.add("mode", "ramp"); |
| 240 | r->setOptions(ro); |
| 241 | |
| 242 | class TestWriter : public NoFilenameWriter, public Streamable |
| 243 | { |
| 244 | std::string getName() const |
| 245 | { return "writers.test"; } |
| 246 | |
| 247 | bool processOne(PointRef& p) |
| 248 | { |
| 249 | g_count++; |
| 250 | return true; |
| 251 | } |
| 252 | }; |
| 253 | |
| 254 | TestWriter w; |
| 255 | Options wo; |
| 256 | wo.add("where", where); |
| 257 | w.setOptions(wo); |
| 258 | w.setInput(*r); |
| 259 | |
| 260 | g_count = 0; |
| 261 | FixedPointTable t(1000); |
| 262 | w.prepare(t); |
| 263 | w.execute(t); |
| 264 | EXPECT_EQ(g_count, expKeep); |
| 265 | } |
| 266 | |
| 267 | // Support for filter that returns no point views. |
| 268 | void exec6(const std::string& where, size_t expKeep, size_t expViews, |
no test coverage detected