Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
gtest_mac.h
Go to the documentation of this file.
1// Copyright 2010 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TESTING_GTEST_MAC_H_
6#define TESTING_GTEST_MAC_H_
7#include <gtest/internal/gtest-port.h>
8#include <gtest/gtest.h>
9#ifdef GTEST_OS_MAC
10#import <Foundation/Foundation.h>
11namespace testing {
12namespace internal {
13// This overloaded version allows comparison between ObjC objects that conform
14// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSEQ().
15GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
16 const char* actual_expression,
17 id<NSObject> expected,
18 id<NSObject> actual);
19// This overloaded version allows comparison between ObjC objects that conform
20// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSNE().
21GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
22 const char* actual_expression,
23 id<NSObject> expected,
24 id<NSObject> actual);
25#if !defined(GTEST_OS_IOS)
26// This overloaded version allows comparison between NSRect objects using
27// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSEQ().
28GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
29 const char* actual_expression,
30 const NSRect& expected,
31 const NSRect& actual);
32// This overloaded version allows comparison between NSRect objects using
33// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSNE().
34GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
35 const char* actual_expression,
36 const NSRect& expected,
37 const NSRect& actual);
38// This overloaded version allows comparison between NSPoint objects using
39// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSEQ().
40GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
41 const char* actual_expression,
42 const NSPoint& expected,
43 const NSPoint& actual);
44// This overloaded version allows comparison between NSPoint objects using
45// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSNE().
46GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
47 const char* actual_expression,
48 const NSPoint& expected,
49 const NSPoint& actual);
50#endif // !GTEST_OS_IOS
51} // namespace internal
52} // namespace testing
53// Tests that [expected isEqual:actual].
54#define EXPECT_NSEQ(expected, actual)
55 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual)
56#define EXPECT_NSNE(val1, val2)
57 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2)
58#define ASSERT_NSEQ(expected, actual)
59 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual)
60#define ASSERT_NSNE(val1, val2)
61 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2)
62#endif // GTEST_OS_MAC
63#endif // TESTING_GTEST_MAC_H_