-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathEquivalenceAsserts_aot.cs
More file actions
105 lines (97 loc) · 3.12 KB
/
EquivalenceAsserts_aot.cs
File metadata and controls
105 lines (97 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#if XUNIT_AOT
#if XUNIT_NULLABLE
#nullable enable
#endif
using System;
using System.ComponentModel;
using System.Linq.Expressions;
namespace Xunit
{
partial class Assert
{
/// <summary>
/// Assert.Equivalent is not supported in Native AOT due to reflection requirements.
/// </summary>
[Obsolete("Assert.Equivalent is not supported in Native AOT", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void Equivalent(
#if XUNIT_NULLABLE
object? expected,
object? actual,
#else
object expected,
object actual,
#endif
bool strict = false) =>
throw new NotSupportedException("Assert.Equivalent is not supported in Native AOT");
/// <summary>
/// Assert.EquivalentWithExclusions is not supported in Native AOT due to reflection requirements.
/// </summary>
[Obsolete("Assert.EquivalentWithExclusions is not supported in Native AOT", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void EquivalentWithExclusions<T>(
#if XUNIT_NULLABLE
object? expected,
#else
object expected,
#endif
T actual,
#if XUNIT_NULLABLE
params Expression<Func<T, object?>>[] exclusionExpressions) =>
#else
params Expression<Func<T, object>>[] exclusionExpressions) =>
#endif
throw new NotSupportedException("Assert.Equivalent is not supported in Native AOT");
/// <summary>
/// Assert.EquivalentWithExclusions is not supported in Native AOT due to reflection requirements.
/// </summary>
[Obsolete("Assert.EquivalentWithExclusions is not supported in Native AOT", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void EquivalentWithExclusions<T>(
#if XUNIT_NULLABLE
object? expected,
#else
object expected,
#endif
T actual,
bool strict,
#if XUNIT_NULLABLE
params Expression<Func<T, object?>>[] exclusionExpressions) =>
#else
params Expression<Func<T, object>>[] exclusionExpressions) =>
#endif
throw new NotSupportedException("Assert.Equivalent is not supported in Native AOT");
/// <summary>
/// Assert.EquivalentWithExclusions is not supported in Native AOT due to reflection requirements.
/// </summary>
[Obsolete("Assert.EquivalentWithExclusions is not supported in Native AOT", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void EquivalentWithExclusions(
#if XUNIT_NULLABLE
object? expected,
object? actual,
#else
object expected,
object actual,
#endif
params string[] exclusionExpressions) =>
throw new NotSupportedException("Assert.Equivalent is not supported in Native AOT");
/// <summary>
/// Assert.EquivalentWithExclusions is not supported in Native AOT due to reflection requirements.
/// </summary>
[Obsolete("Assert.EquivalentWithExclusions is not supported in Native AOT", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void EquivalentWithExclusions(
#if XUNIT_NULLABLE
object? expected,
object? actual,
#else
object expected,
object actual,
#endif
bool strict,
params string[] exclusionExpressions) =>
throw new NotSupportedException("Assert.Equivalent is not supported in Native AOT");
}
}
#endif // XUNIT_AOT