Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62fccd8

Browse files
committed
Remove usage of NUnit APIs not available in internal build
1 parentaa3111c commit62fccd8

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

‎vsintegration/src/unittests/TestLib.Utils.fs‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ module Asserts =
3535
letmessage= sprintf"Expected S_OK"
3636
printfn"%s" message
3737
Assert.Fail(message)
38-
38+
letThrows<'Twhen'T:>Exception>f=
39+
leterror=
40+
try
41+
f()
42+
Some(sprintf"No exception occurred, expected%O" typeof<'T>)
43+
with
44+
|:? 'T-> None
45+
| e-> Some(sprintf"Wrong exception type occurred. Got%O, expecting%O"(e.GetType()) typeof<'T>)
46+
match errorwith
47+
| Some(msg)-> Assert.Fail(msg)
48+
| None->()
3949

4050
moduleUIStuff=
4151
letSetupSynchronizationContext()=

‎vsintegration/src/unittests/Tests.ProjectSystem.Miscellaneous.fs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,8 @@ type Utilities() =
774774
Assert.AreEqual(255L, ProjectNode.ParsePropertyValueToInt64("0xFF"))
775775
Assert.AreEqual(null, ProjectNode.ParsePropertyValueToInt64(""))
776776
Assert.AreEqual(null, ProjectNode.ParsePropertyValueToInt64(null))
777-
Assert.Throws<Exception>(fun()-> ignore(ProjectNode.ParsePropertyValueToInt64("abc")))|> ignore
778-
Assert.Throws<Exception>(fun()-> ignore(ProjectNode.ParsePropertyValueToInt64("12333333333333333333333333")))|> ignore
779-
777+
Throws<Exception>(fun()-> ignore(ProjectNode.ParsePropertyValueToInt64("abc")))
778+
Throws<Exception>(fun()-> ignore(ProjectNode.ParsePropertyValueToInt64("12333333333333333333333333")))
780779

781780
#if DEBUGGERVISUALIZER
782781
moduleinternalDebugViz=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp