semantics_ir_test_helpers.h 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_SEMANTICS_SEMANTICS_IR_TEST_HELPERS_H_
  5. #define CARBON_TOOLCHAIN_SEMANTICS_SEMANTICS_IR_TEST_HELPERS_H_
  6. #include <gmock/gmock.h>
  7. #include <gtest/gtest.h>
  8. #include "common/check.h"
  9. #include "common/ostream.h"
  10. #include "llvm/ADT/StringExtras.h"
  11. #include "toolchain/semantics/nodes/binary_operator_test_matchers.h"
  12. #include "toolchain/semantics/nodes/function_test_matchers.h"
  13. #include "toolchain/semantics/nodes/integer_literal_test_matchers.h"
  14. #include "toolchain/semantics/nodes/return_test_matchers.h"
  15. #include "toolchain/semantics/nodes/set_name_test_matchers.h"
  16. #include "toolchain/semantics/semantics_ir_for_test.h"
  17. namespace Carbon::Testing {
  18. // Avoids gtest confusion of how to print llvm::None.
  19. MATCHER(IsNone, "is llvm::None") { return arg == llvm::None; }
  20. } // namespace Carbon::Testing
  21. #endif // CARBON_TOOLCHAIN_SEMANTICS_SEMANTICS_IR_TEST_HELPERS_H_