1*a03ca8b9SKrzysztof Kosiński // Copyright 2017 The Chromium Authors. All rights reserved. 2*a03ca8b9SKrzysztof Kosiński // Use of this source code is governed by a BSD-style license that can be 3*a03ca8b9SKrzysztof Kosiński // found in the LICENSE file. 4*a03ca8b9SKrzysztof Kosiński 5*a03ca8b9SKrzysztof Kosiński #include "components/zucchini/test_reference_reader.h" 6*a03ca8b9SKrzysztof Kosiński 7*a03ca8b9SKrzysztof Kosiński namespace zucchini { 8*a03ca8b9SKrzysztof Kosiński TestReferenceReader(const std::vector<Reference> & refs)9*a03ca8b9SKrzysztof KosińskiTestReferenceReader::TestReferenceReader(const std::vector<Reference>& refs) 10*a03ca8b9SKrzysztof Kosiński : references_(refs) {} 11*a03ca8b9SKrzysztof Kosiński 12*a03ca8b9SKrzysztof Kosiński TestReferenceReader::~TestReferenceReader() = default; 13*a03ca8b9SKrzysztof Kosiński GetNext()14*a03ca8b9SKrzysztof Kosińskistd::optional<Reference> TestReferenceReader::GetNext() { 15*a03ca8b9SKrzysztof Kosiński if (index_ == references_.size()) 16*a03ca8b9SKrzysztof Kosiński return std::nullopt; 17*a03ca8b9SKrzysztof Kosiński return references_[index_++]; 18*a03ca8b9SKrzysztof Kosiński } 19*a03ca8b9SKrzysztof Kosiński 20*a03ca8b9SKrzysztof Kosiński } // namespace zucchini 21