blob: 59e12e24466f8114710a6499eaf59192dea35b30 [file] [log] [blame]
// Copyright 2019 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.
#ifndef TOOLS_FIDL_FIDLC_TESTS_UNITTEST_HELPERS_H_
#define TOOLS_FIDL_FIDLC_TESTS_UNITTEST_HELPERS_H_
#include <zxtest/zxtest.h>
#define ASSERT_STRING_EQ(lhs, rhs, ...) \
ASSERT_STREQ(std::string(lhs).c_str(), std::string(rhs).c_str(), ##__VA_ARGS__)
#define ASSERT_NULLPTR(value, ...) ASSERT_EQ(value, nullptr, ##__VA_ARGS__)
#define ASSERT_NOT_NULLPTR(value, ...) ASSERT_NE(value, nullptr, ##__VA_ARGS__)
#define EXPECT_STRING_EQ(lhs, rhs, ...) \
EXPECT_STREQ(std::string(lhs).c_str(), std::string(rhs).c_str(), ##__VA_ARGS__)
#define EXPECT_NULLPTR(value, ...) EXPECT_EQ(value, nullptr, ##__VA_ARGS__)
#define EXPECT_NOT_NULLPTR(value, ...) EXPECT_NE(value, nullptr, ##__VA_ARGS__)
#endif // TOOLS_FIDL_FIDLC_TESTS_UNITTEST_HELPERS_H_