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 <zircon/assert.h>
9 #include <zxtest/base/test.h>
10 
11 namespace zxtest {
12 
Run()13 void Test::Run() {
14     ZX_DEBUG_ASSERT_MSG(driver_ != nullptr, "Runner must set the test driver.");
15     SetUp();
16     // Only execute the test body if there were no set up errors.
17     if (driver_->Continue()) {
18         TestBody();
19     }
20     // Even if errors ocurred, we might want to clean any resources.
21     TearDown();
22 }
23 
24 } // namespace zxtest
25