Semantics\NullableContextTests.cs (11)
23[InlineData("#nullable enable", NullableContextOptions.Disable, NullableContext.Enabled)]
24[InlineData("#nullable enable", NullableContextOptions.Annotations, NullableContext.Enabled)]
25[InlineData("#nullable enable", NullableContextOptions.Warnings, NullableContext.Enabled)]
26[InlineData("#nullable enable", NullableContextOptions.Enable, NullableContext.Enabled)]
30[InlineData("#nullable enable warnings", NullableContextOptions.Annotations, NullableContext.Enabled | NullableContext.AnnotationsContextInherited)]
31[InlineData("#nullable enable warnings", NullableContextOptions.Enable, NullableContext.Enabled | NullableContext.AnnotationsContextInherited)]
34[InlineData("#nullable enable annotations", NullableContextOptions.Warnings, NullableContext.Enabled | NullableContext.WarningsContextInherited)]
36[InlineData("#nullable enable annotations", NullableContextOptions.Enable, NullableContext.Enabled | NullableContext.WarningsContextInherited)]
105Assert.Equal(NullableContext.Enabled, model1.GetNullableContext(classDecl1));
106Assert.Equal(NullableContext.Enabled | NullableContext.ContextInherited, model2.GetNullableContext(classDecl2));
131AssertEnabledForInheritance(NullableContext.Enabled, warningsEnabled: true, annotationsEnabled: true);