Skip to content

Commit 5e7355d

Browse files
committed
add test for fsharp/fsharp#483 (2)
1 parent ad65c02 commit 5e7355d

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

tests/fsharp/core/attributes/test.fsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,20 @@ module ParamArrayNullAttribute =
13421342
check "vwcewecioj9" (test3()) "Attr(<null>)"
13431343

13441344

1345+
// See https://github.com/fsharp/fsharp/issues/483
1346+
// We do not expect an exception
1347+
module TestFsiLoadOfNonExistentAssembly =
1348+
let test() =
1349+
try
1350+
let log4netType = System.Type.GetType("ThisTypeDoes.Not.Exist, thisAssemblyDoesNotExist")
1351+
let exists = log4netType <> null
1352+
if exists then report_failure (sprintf "type existed!")
1353+
do printfn "%A" exists
1354+
with e ->
1355+
report_failure (sprintf "exception unexpected: %s" e.Message)
1356+
1357+
do test()
1358+
13451359

13461360
(*-------------------------------------------------------------------------
13471361
!* Test passed?

tests/fsharp/core/fsiAndModifiers/test.fsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ module TestPack4 =
8686
printfn "got %A" got
8787
if got <> expected then fail (sprintf "TestPack4: got %A, expected %A" got expected)
8888

89-
// See https://github.com/fsharp/fsharp/issues/483
90-
module TestFsiLoadOfNonExistentAssembly =
91-
let test() =
92-
try
93-
let log4netType = System.Type.GetType("ThisTypeDoes.Not.Exist, thisAssemblyDoesNotExist")
94-
let exists = log4netType <> null
95-
if exists then fail (sprintf "type existed!")
96-
do printfn "%A" exists
97-
with e ->
98-
fail (sprintf "exception unexpected: %s" e.Message)
99-
100-
do test()
101-
10289
if errors.IsEmpty then
10390
System.IO.File.WriteAllText("test.ok", "")
10491
else

0 commit comments

Comments
 (0)