1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <memory>
6 #include <utility>
7 
8 #include <zxtest/base/test-info.h>
9 #include <zxtest/base/test.h>
10 #include <zxtest/base/types.h>
11 
12 namespace zxtest {
13 
TestInfo(const fbl::String & name,const SourceLocation & location,internal::TestFactory factory)14 TestInfo::TestInfo(const fbl::String& name, const SourceLocation& location,
15                    internal::TestFactory factory)
16     : factory_(std::move(factory)), name_(name), location_(location) {}
17 TestInfo::TestInfo(TestInfo&& rhs) = default;
18 TestInfo::~TestInfo() = default;
19 
Instantiate(internal::TestDriver * driver) const20 std::unique_ptr<Test> TestInfo::Instantiate(internal::TestDriver* driver) const {
21     return factory_(driver);
22 }
23 
24 } // namespace zxtest
25