chromium/components/reporting/util/status_macros_unittest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/reporting/util/status_macros.h"

#include "base/debug/stack_trace.h"
#include "base/types/expected.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/statusor.h"
#include "testing/gtest/include/gtest/gtest-spi.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace reporting {
namespace {

Status StatusTestFunction(bool fail) {}

Status ReturnIfErrorStatusWrapperFunction(bool fail) {}

// RETURN_IF_ERROR_STATUS macro actually returns on a non-OK status.
TEST(StatusMacros, ReturnsOnErrorStatus) {}

// RETURN_IF_ERROR_STATUS macro continues on an OK status.
TEST(StatusMacros, ReturnIfErrorStatusContinuesOnOk) {}

base::unexpected<Status> UnexpectedStatusTestFunction(bool fail) {}

StatusOr<int> ReturnIfErrorUnexpectedStatusWrapperFunction(bool fail) {}

// RETURN_IF_ERROR_STATUS macro actually returns on a non-OK status.
TEST(StatusMacros, ReturnsOnErrorUnexpectedStatus) {}

// RETURN_IF_ERROR_STATUS macro continues on an OK status.
TEST(StatusMacros, ReturnIfErrorUnexpectedStatusContinuesOnOk) {}

TEST(StatusMacros, CheckOKOnStatus) {}

TEST(StatusMacros, DCheckOKOnStatus) {}

void AssertOKErrorStatus() {}

TEST(StatusMacros, AssertOKOnStatus) {}

void ExpectOKErrorStatus() {}

TEST(StatusMacros, ExpectOKOnStatus) {}

TEST(StatusMacros, CheckOKOnStatusOr) {}

TEST(StatusMacros, DCheckOKOnStatusOr) {}

void AssertOKErrorStatusOr() {}

TEST(StatusMacros, AssertOKOnStatusOr) {}

void ExpectOKErrorStatusOr() {}

TEST(StatusMacros, ExpectOKOnStatusOr) {}
}  // namespace
}  // namespace reporting