Skip to content

Commit e4864f8

Browse files
committed
temp
1 parent 9d86798 commit e4864f8

File tree

14 files changed

+61
-93
lines changed

14 files changed

+61
-93
lines changed

tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/Directives/Directives.fs

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Directives =
2525

2626
let compileAndRunAsFsxShouldSucceed compilation =
2727
compilation
28+
|> asFsx
2829
|> withNoWarn 988
2930
|> runFsi
3031
|> shouldSucceed
@@ -36,20 +37,6 @@ module Directives =
3637
|> compileExeAndRun
3738
|> shouldSucceed
3839

39-
40-
//Directives.fs
41-
//dummy.fsx
42-
//dummy2.fsx
43-
//env.lst
44-
//E_R_01.fsx
45-
//E_ShebangLocation.fsx
46-
//load_script_with_multiple_nowarn01.fsx
47-
//multiple_nowarn01.fsx
48-
//multiple_nowarn02.fsx
49-
//multiple_nowarn_many.fs
50-
//multiple_nowarn_one.fs
51-
52-
5340
[<FileInlineData("dummy.fsx")>]
5441
[<FileInlineData("dummy2.fsx")>]
5542
[<FileInlineData("load_script_with_multiple_nowarn01.fsx")>]
@@ -79,9 +66,9 @@ module Directives =
7966
let ``E_R_01_fsx`` compilation =
8067
compilation
8168
|> getCompilation
82-
|> compileAndRunAsFsxShouldSucceed
69+
|> compileAndRunAsFsxShouldSucceed /// Should be succeed with diagnostics
8370
|> withDiagnostics [
84-
(Error 517, Line 9, Col 1, Line 9, Col 3, "End of file in string embedded in comment begun at or before here")
71+
(Warning 3353, Line 5, Col 1, Line 5, Col 14, "Invalid directive '#R somefile'")
8572
]
8673

8774
[<Theory; FileInlineData("E_ShebangLocation.fsx")>]
@@ -91,42 +78,3 @@ module Directives =
9178
|> shouldFailWithDiagnostics [
9279
(Error 0, Line 3, Col 1, Line 3, Col 4, "#! may only appear as the first line at the start of a file.")
9380
]
94-
95-
// [<Theory; FileInlineData("E_ocamlstyle_nested006.fsx")>]
96-
// let ``E_ocamlstyle_nested006_fsx`` compilation =
97-
// compilation
98-
// |> getCompilation
99-
// |> shouldFailWithDiagnostics [
100-
// (Error 58, Line 14, Col 1, Line 14, Col 1, """Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (9:1). Try indenting this further.
101-
//To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7.""")
102-
// (Error 10, Line 14, Col 1, Line 14, Col 1, "Incomplete structured construct at or before this point in binding")
103-
// (Error 516, Line 9, Col 10, Line 9, Col 12, "End of file in comment begun at or before here")
104-
// ]
105-
//
106-
// [<Theory; FileInlineData("E_ocamlstyle_nested007.fsx")>]
107-
// let ``E_ocamlstyle_nested007_fsx`` compilation =
108-
// compilation
109-
// |> getCompilation
110-
// |> shouldFailWithDiagnostics [
111-
// (Error 10, Line 12, Col 47, Line 14, Col 18, "Unexpected string literal in binding. Expected incomplete structured construct at or before this point or other token.")
112-
// (Error 3118, Line 10, Col 1, Line 10, Col 4, "Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword.")
113-
// (Error 3156, Line 14, Col 19, Line 14, Col 20, "Unexpected token '*' or incomplete expression")
114-
// (Error 10, Line 14, Col 20, Line 14, Col 21, "Unexpected symbol ')' in implementation file")
115-
// ]
116-
//
117-
// [<Theory; FileInlineData("E_star02.fsx")>]
118-
// let ``E_star02_fsx`` compilation =
119-
// compilation
120-
// |> getCompilation
121-
// |> shouldFailWithDiagnostics [
122-
// (Error 10, Line 8, Col 4, Line 8, Col 5, "Unexpected symbol ')' in implementation file")
123-
// ]
124-
//
125-
// [<Theory; FileInlineData("E_IncompleteComment01.fsx")>]
126-
// let ``E_star02E_IncompleteComment01_fsx`` compilation =
127-
// compilation
128-
// |> getCompilation
129-
// |> shouldFailWithDiagnostics [
130-
// (Error 10, Line 18, Col 1, Line 18, Col 1, "Incomplete structured construct at or before this point in binding")
131-
// (Error 516, Line 9, Col 5, Line 9, Col 7, "End of file in comment begun at or before here")
132-
// ]

tests/FSharp.Compiler.ComponentTests/Conformance/LexicalAnalysis/NumericLiterals/NumericLiterals.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module NumericLiterals =
3838
|> getCompilation
3939
|> shouldSucceed
4040

41+
#if NETFRAMEWORK
4142
[<Theory;FileInlineData("E_BigIntConversion01.fsx")>]
4243
let ``E_BigIntConversion01_fsx`` compilation =
4344
compilation
@@ -53,6 +54,7 @@ module NumericLiterals =
5354
|> shouldFailWithDiagnostics [
5455
(Error 1, Line 8, Col 14, Line 8, Col 17, "The type 'System.Numerics.BigInteger' does not support a conversion to the type 'char'")
5556
]
57+
#endif
5658

5759
[<Theory;FileInlineData("E_BigNumNotImpl01.fsx")>]
5860
let ``E_BigNumNotImpl01_fsx`` compilation =

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@ let printMeasure x =
2121

2222
let testSprocket() =
2323
let ret1 = printMeasure 1.23<sprocket>
24-
if ret1 <> "float sprocket with value 1.23" then exit 1
24+
if ret1 <> "float sprocket with value 1.23" then ignore 1
2525

2626
let ret2 = printMeasure 0.001f<sprocket>
27-
if ret2 <> "float32 sprocket with value 0.001" then exit 1
27+
if ret2 <> "float32 sprocket with value 0.001" then ignore 1
2828

2929
let ret3 = printMeasure 1e3m<sprocket>
30-
if ret3 <> "decimal sprocket with value 1000" then exit 1
30+
if ret3 <> "decimal sprocket with value 1000" then ignore 1
3131

3232
let testWidget() =
3333
// NOTE: that currently, measures are ignored at runtime. See bug 3688.
3434
let ret1 = printMeasure 1.23<widget>
35-
if ret1 <> "float sprocket with value 1.23" then exit 1
35+
if ret1 <> "float sprocket with value 1.23" then ignore 1
3636

3737
let ret2 = printMeasure 0.001f<widget>
38-
if ret2 <> "float32 sprocket with value 0.001" then exit 1
38+
if ret2 <> "float32 sprocket with value 0.001" then ignore 1
3939

4040
let ret3 = printMeasure 1e3m<widget>
41-
if ret3 <> "decimal sprocket with value 1000" then exit 1
41+
if ret3 <> "decimal sprocket with value 1000" then ignore 1
4242

4343
testSprocket()
4444
testWidget()
4545

46-
exit 0
46+
ignore 0

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Ints01.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ let factoryRate2 = makeWidget16() / 1s<s>
1717
let factoryRate3 = makeWidget32() / 1<s>
1818
let factoryRate4 = makeWidget64() / 1L<s>
1919

20-
exit 0
20+
ignore 0
2121

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Mars.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ let lbfToN (force:float<lbf>) = force * 0.224809<N/lbf>
4040

4141
do applyThruster(lbfToN(3.0<lbf>))
4242

43-
exit 0
43+
ignore 0

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc04.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ let a : decimal<1> = ceil 4.4M<1>
77
let b : decimal<1> = floor 4.4M<1>
88
let c : decimal<1> = round 4.4M<1>
99

10-
if a <> 5.0M then exit 1
11-
if b <> 4.0M then exit 1
12-
if c <> 4.0M then exit 1
10+
if a <> 5.0M then ignore 1
11+
if b <> 4.0M then ignore 1
12+
if c <> 4.0M then ignore 1
1313

14-
exit 0
14+
ignore 0

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ let widgetsPerSprocket = 5.0M<Widgets> / 1.25M<Sprockets>
1313

1414
// Addition
1515
let addition =
16-
if widgetsPerSprocket + widgetsPerSprocket <> (10.0M / 1.25M) * 1M<Widgets / Sprockets> then exit 1
16+
if widgetsPerSprocket + widgetsPerSprocket <> (10.0M / 1.25M) * 1M<Widgets / Sprockets> then ignore 1
1717

1818
// Multiplication
1919
let multiplication =
2020
let x = 2.50000000M<Sprockets>
21-
if x * widgetsPerSprocket <> 10.0M<Widgets> then exit 1
21+
if x * widgetsPerSprocket <> 10.0M<Widgets> then ignore 1
2222

2323
// Subtraction
2424
let subtraction =
25-
if widgetsPerSprocket - widgetsPerSprocket <> 0.0M<Widgets / Sprockets> then exit 1
25+
if widgetsPerSprocket - widgetsPerSprocket <> 0.0M<Widgets / Sprockets> then ignore 1
2626

2727
// Division
2828
let division =
29-
if widgetsPerSprocket / 5.0M<Widgets> <> (1.0M / 1.25M) * 1M<Sprockets^-1> then exit 1
29+
if widgetsPerSprocket / 5.0M<Widgets> <> (1.0M / 1.25M) * 1M<Sprockets^-1> then ignore 1
3030

31-
exit 0
31+
ignore 0
3232

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ let f<'a,'b when 'a : struct>() = 1
88

99
let x = f<float<m>,float>()
1010

11-
exit 0
11+
ignore 0

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ let differentiate (h:float<_>) f x = (f(x+h) - f(x-h)) / (2.0*h)
66

77
let f (x : float<_>) = x * x
88

9-
if (differentiate 2.0<1> f 2.0) <> 4.0 then exit 1
9+
if (differentiate 2.0<1> f 2.0) <> 4.0 then ignore 1
1010

11-
exit 0
11+
ignore 0

tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
let f ( x:float<'u> ) : float<'v> = x * 1.0<_>
1010

11-
if (f 3.5<kg>) <> 3.5<kg> then exit 1
11+
if (f 3.5<kg>) <> 3.5<kg> then ignore 1
1212

13-
exit 0
13+
ignore 0

0 commit comments

Comments
 (0)