-
Notifications
You must be signed in to change notification settings - Fork 493
Expand file tree
/
Copy pathBindablePropertyDefaultValueCreatorAnalyzerBenchmarks.cs
More file actions
46 lines (39 loc) · 2.23 KB
/
BindablePropertyDefaultValueCreatorAnalyzerBenchmarks.cs
File metadata and controls
46 lines (39 loc) · 2.23 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
using BenchmarkDotNet.Attributes;
using CommunityToolkit.Maui.Analyzers.UnitTests;
namespace CommunityToolkit.Maui.Analyzers.Benchmarks;
[MemoryDiagnoser]
public class BindablePropertyDefaultValueCreatorAnalyzerBenchmarks
{
static readonly BindablePropertyDefaultValueCreatorAnalyzerTests bindablePropertyDefaultValueCreatorAnalyzerTests = new();
static readonly AttachedBindablePropertyDefaultValueCreatorAnalyzerTests attachedBindablePropertyDefaultValueCreatorAnalyzerTests = new();
[Benchmark]
public Task BindablePropertyDefaultValueCreatorAnalyzerTests_VerifyErrorWhenDefaultValueCreatorMethodHasBlockBodyReturningStaticReadonlyField()
{
return bindablePropertyDefaultValueCreatorAnalyzerTests.VerifyErrorWhenDefaultValueCreatorMethodHasBlockBodyReturningStaticReadonlyField();
}
[Benchmark]
public Task AttachedBindablePropertyDefaultValueCreatorAnalyzerTests_VerifyErrorWhenDefaultValueCreatorMethodHasBlockBodyReturningStaticReadonlyField()
{
return attachedBindablePropertyDefaultValueCreatorAnalyzerTests.VerifyErrorWhenDefaultValueCreatorMethodHasBlockBodyReturningStaticReadonlyField();
}
[Benchmark]
public Task BindablePropertyDefaultValueCreatorAnalyzerTests_VerifyErrorWhenDefaultValueCreatorMethodReturnsStaticReadonlyPropertyFromDifferentClass()
{
return bindablePropertyDefaultValueCreatorAnalyzerTests.VerifyErrorWhenDefaultValueCreatorMethodReturnsStaticReadonlyPropertyFromDifferentClass();
}
[Benchmark]
public Task AttachedBindablePropertyDefaultValueCreatorAnalyzerTests_VerifyErrorWhenDefaultValueCreatorMethodReturnsStaticReadonlyPropertyFromDifferentClass()
{
return attachedBindablePropertyDefaultValueCreatorAnalyzerTests.VerifyErrorWhenDefaultValueCreatorMethodReturnsStaticReadonlyPropertyFromDifferentClass();
}
[Benchmark]
public Task BindablePropertyDefaultValueCreatorAnalyzerTests_VerifyNoErrorWhenAttributeIsNotBindableProperty()
{
return bindablePropertyDefaultValueCreatorAnalyzerTests.VerifyNoErrorWhenAttributeIsNotBindableProperty();
}
[Benchmark]
public Task AttachedBindablePropertyDefaultValueCreatorAnalyzerTests_VerifyNoErrorWhenAttributeIsNotBindableProperty()
{
return attachedBindablePropertyDefaultValueCreatorAnalyzerTests.VerifyNoErrorWhenAttributeIsNotBindableProperty();
}
}