Skip to content

Commit 310cffd

Browse files
committed
Update ranges in unit tests.
1 parent cc02b71 commit 310cffd

File tree

7 files changed

+70
-71
lines changed

7 files changed

+70
-71
lines changed

tests/FSharp.Compiler.ComponentTests/Conformance/BasicTypeAndModuleDefinitions/GeneratedEqualityHashingComparison/Attributes/Diags/Diags.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Diags =
1717
|> compile
1818
|> shouldFail
1919
|> withDiagnostics [
20-
(Error 501, Line 7, Col 3, Line 7, Col 23, "The object constructor 'StructuralComparisonAttribute' takes 0 argument(s) but is here given 1. The required signature is 'new: unit -> StructuralComparisonAttribute'.")
20+
(Error 501, Line 7, Col 3, Line 7, Col 30, "The object constructor 'StructuralComparisonAttribute' takes 0 argument(s) but is here given 1. The required signature is 'new: unit -> StructuralComparisonAttribute'.")
2121
]
2222

2323
// SOURCE=E_AdjustUses01b.fs SCFLAGS=--test:ErrorRanges # E_AdjustUses01b.fs
@@ -28,6 +28,6 @@ module Diags =
2828
|> compile
2929
|> shouldFail
3030
|> withDiagnostics [
31-
(Error 501, Line 7, Col 3, Line 7, Col 23, "The object constructor 'StructuralComparisonAttribute' takes 0 argument(s) but is here given 1. The required signature is 'new: unit -> StructuralComparisonAttribute'.")
31+
(Error 501, Line 7, Col 3, Line 7, Col 30, "The object constructor 'StructuralComparisonAttribute' takes 0 argument(s) but is here given 1. The required signature is 'new: unit -> StructuralComparisonAttribute'.")
3232
]
3333

tests/FSharp.Compiler.ComponentTests/Conformance/BasicTypeAndModuleDefinitions/GeneratedEqualityHashingComparison/Attributes/Legacy/Legacy.fs

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/AttributeUsage.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ module AttributeUsage =
7979
|> shouldFail
8080
|> withDiagnostics [
8181
(Error 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element")
82-
(Error 842, Line 24, Col 28, Line 24, Col 29, "This attribute is not valid for use on this language element")
83-
(Error 842, Line 27, Col 15, Line 27, Col 16, "This attribute is not valid for use on this language element")
82+
(Error 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element")
83+
(Error 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element")
8484
]
8585

8686
// SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs
@@ -90,9 +90,9 @@ module AttributeUsage =
9090
|> verifyCompile
9191
|> shouldFail
9292
|> withDiagnostics [
93-
(Error 842, Line 14, Col 17, Line 14, Col 34, "This attribute is not valid for use on this language element")
94-
(Error 842, Line 24, Col 14, Line 24, Col 29, "This attribute is not valid for use on this language element")
95-
(Error 842, Line 29, Col 25, Line 29, Col 40, "This attribute is not valid for use on this language element")
93+
(Error 842, Line 14, Col 7, Line 14, Col 34, "This attribute is not valid for use on this language element")
94+
(Error 842, Line 24, Col 7, Line 24, Col 36, "This attribute is not valid for use on this language element")
95+
(Error 842, Line 29, Col 15, Line 29, Col 47, "This attribute is not valid for use on this language element")
9696
]
9797

9898
// SOURCE=E_ConditionalAttribute.fs SCFLAGS="--test:ErrorRanges" # E_ConditionalAttribute.fs

tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/CustomAttributes/Basic/Basic.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module Basic =
4141
|> verifyCompile
4242
|> shouldFail
4343
|> withDiagnostics [
44-
(Error 841, Line 7, Col 12, Line 7, Col 49, "This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module.")
44+
(Error 841, Line 7, Col 3, Line 7, Col 111, "This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module.")
4545
]
4646

4747
// SOURCE=E_AttributeApplication02.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication02.fs
@@ -106,8 +106,8 @@ module Basic =
106106
(Error 1, Line 10, Col 3, Line 10, Col 59, "This expression was expected to have type\n 'int array' \nbut here has type\n 'unit' ")
107107
(Error 267, Line 10, Col 3, Line 10, Col 59, "This is not a valid constant expression or custom attribute value")
108108
(Error 850, Line 10, Col 3, Line 10, Col 59, "This attribute cannot be used in this version of F#")
109-
(Error 850, Line 13, Col 3, Line 13, Col 52, "This attribute cannot be used in this version of F#")
110-
(Error 850, Line 16, Col 13, Line 16, Col 37, "This attribute cannot be used in this version of F#")
109+
(Error 850, Line 13, Col 3, Line 13, Col 101, "This attribute cannot be used in this version of F#")
110+
(Error 850, Line 16, Col 3, Line 16, Col 50, "This attribute cannot be used in this version of F#")
111111
]
112112

113113
// SOURCE=E_AttributeTargetSpecifications.fs # E_AttributeTargetSpecifications.fs
@@ -305,7 +305,7 @@ module Basic =
305305
|> verifyCompile
306306
|> shouldFail
307307
|> withDiagnostics [
308-
(Error 429, Line 16, Col 28, Line 16, Col 31, "The attribute type 'CA1' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element.")
308+
(Error 429, Line 16, Col 28, Line 16, Col 37, "The attribute type 'CA1' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element.")
309309
]
310310

311311
// SOURCE=W_StructLayoutExplicit01.fs SCFLAGS="--test:ErrorRanges" PEVER="/Exp_Fail" # W_StructLayoutExplicit01.fs

tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/LetBindings/Basic/Basic.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ module Basic =
5353
|> shouldFail
5454
|> withDiagnostics [
5555
(Error 683, Line 14, Col 6, Line 14, Col 27, "Attributes are not allowed within patterns")
56-
(Error 842, Line 14, Col 8, Line 14, Col 23, "This attribute is not valid for use on this language element")
56+
(Error 842, Line 14, Col 8, Line 14, Col 25, "This attribute is not valid for use on this language element")
5757
(Error 683, Line 14, Col 42, Line 14, Col 63, "Attributes are not allowed within patterns")
58-
(Error 842, Line 14, Col 44, Line 14, Col 59, "This attribute is not valid for use on this language element")
58+
(Error 842, Line 14, Col 44, Line 14, Col 61, "This attribute is not valid for use on this language element")
5959
]
6060

6161
// SOURCE=E_ErrorsForInlineValue.fs SCFLAGS="--test:ErrorRanges" # E_ErrorsForInlineValue.fs

tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnsupportedAttributes.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type C() =
2727
Range = { StartLine = 3
2828
StartColumn = 13
2929
EndLine = 3
30-
EndColumn = 37 }
30+
EndColumn = 41 }
3131
Message =
3232
"This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect." }
3333
{ Error = Warning 202
@@ -41,7 +41,7 @@ type C() =
4141
Range = { StartLine = 6
4242
StartColumn = 22
4343
EndLine = 6
44-
EndColumn = 78 }
44+
EndColumn = 82 }
4545
Message =
4646
"This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect." }
4747
{ Error = Warning 202

tests/service/SyntaxTreeTests/AttributeTests.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module FSharp.Compiler.Service.Tests.SyntaxTreeTests.AttributeTests
33
open FSharp.Compiler.Service.Tests.Common
44
open FSharp.Compiler.Syntax
55
open NUnit.Framework
6-
open Tests.Service.Symbols
76

87
[<Test>]
98
let ``range of attribute`` () =

0 commit comments

Comments
 (0)