You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It "Public 'Language' enumeration contains all members" {
5
37
[Enum]::GetNames("Microsoft.PowerShell.Commands.Language") -join","| Should Be "CSharp,CSharpVersion7,CSharpVersion6,CSharpVersion5,CSharpVersion4,CSharpVersion3,CSharpVersion2,CSharpVersion1,VisualBasic,JScript"
6
38
}
@@ -20,4 +52,15 @@ public class AttributeTest$guid {}
20
52
It "Can load TPA assembly System.Runtime.Serialization.Primitives.dll" {
21
53
Add-Type-AssemblyName 'System.Runtime.Serialization.Primitives'-PassThru | Should Not Be $null
22
54
}
55
+
56
+
It "Can compile C# files" {
57
+
58
+
{ [Test.AddType.BasicTest1]::Add1(1,2) } | Should Throw
59
+
{ [Test.AddType.BasicTest2]::Add2(3,4) } | Should Throw
60
+
61
+
Add-Type-Path $codeFile1,$codeFile2
62
+
63
+
{ [Test.AddType.BasicTest1]::Add1(1,2) } | Should Not Throw
64
+
{ [Test.AddType.BasicTest2]::Add2(3,4) } | Should Not Throw
0 commit comments