blob: d89ee81a802c7478dd4c67633f6a6cb99179149c [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/integration_testing/cpp/reporting.h>
namespace modular {
namespace testing {
TestPoint::TestPoint(std::string label) : label_(std::move(label)) {
RegisterTestPoint(label_);
}
TestPoint::~TestPoint() {
if (!value_)
TEST_FAIL(label_);
}
void TestPoint::Pass() {
value_ = true;
TEST_PASS(label_);
PassTestPoint(label_);
}
} // namespace testing
} // namespace modular