CodeCompilerCas.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. //
  2. // CodeCompilerCas.cs
  3. // - CAS unit tests for System.CodeDom.Compiler.CodeCompiler
  4. //
  5. // Author:
  6. // Sebastien Pouliot <[email protected]>
  7. //
  8. // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. using NUnit.Framework;
  30. using System;
  31. using System.CodeDom;
  32. using System.CodeDom.Compiler;
  33. using System.IO;
  34. using System.Reflection;
  35. using System.Security;
  36. using System.Security.Permissions;
  37. namespace MonoCasTests.System.CodeDom.Compiler {
  38. class CodeCompilerTest : CodeCompiler {
  39. public CodeCompilerTest ()
  40. {
  41. }
  42. protected override string CmdArgsFromParameters (CompilerParameters options)
  43. {
  44. return String.Empty;
  45. }
  46. protected override string CompilerName {
  47. get { return String.Empty; }
  48. }
  49. protected override string FileExtension {
  50. get { return String.Empty; }
  51. }
  52. protected override void ProcessCompilerOutputLine (CompilerResults results, string line)
  53. {
  54. }
  55. protected override string CreateEscapedIdentifier (string value)
  56. {
  57. return String.Empty;
  58. }
  59. protected override string CreateValidIdentifier (string value)
  60. {
  61. return String.Empty;
  62. }
  63. protected override void GenerateArgumentReferenceExpression (CodeArgumentReferenceExpression e)
  64. {
  65. }
  66. protected override void GenerateArrayCreateExpression (CodeArrayCreateExpression e)
  67. {
  68. }
  69. protected override void GenerateArrayIndexerExpression (CodeArrayIndexerExpression e)
  70. {
  71. }
  72. protected override void GenerateAssignStatement (CodeAssignStatement e)
  73. {
  74. }
  75. protected override void GenerateAttachEventStatement (CodeAttachEventStatement e)
  76. {
  77. }
  78. protected override void GenerateAttributeDeclarationsEnd (CodeAttributeDeclarationCollection attributes)
  79. {
  80. }
  81. protected override void GenerateAttributeDeclarationsStart (CodeAttributeDeclarationCollection attributes)
  82. {
  83. }
  84. protected override void GenerateBaseReferenceExpression (CodeBaseReferenceExpression e)
  85. {
  86. }
  87. protected override void GenerateCastExpression (CodeCastExpression e)
  88. {
  89. }
  90. protected override void GenerateComment (CodeComment e)
  91. {
  92. }
  93. protected override void GenerateConditionStatement (CodeConditionStatement e)
  94. {
  95. }
  96. protected override void GenerateConstructor (CodeConstructor e, CodeTypeDeclaration c)
  97. {
  98. }
  99. protected override void GenerateDelegateCreateExpression (CodeDelegateCreateExpression e)
  100. {
  101. }
  102. protected override void GenerateDelegateInvokeExpression (CodeDelegateInvokeExpression e)
  103. {
  104. }
  105. protected override void GenerateEntryPointMethod (CodeEntryPointMethod e, CodeTypeDeclaration c)
  106. {
  107. }
  108. protected override void GenerateEvent (CodeMemberEvent e, CodeTypeDeclaration c)
  109. {
  110. }
  111. protected override void GenerateEventReferenceExpression (CodeEventReferenceExpression e)
  112. {
  113. }
  114. protected override void GenerateExpressionStatement (CodeExpressionStatement e)
  115. {
  116. }
  117. protected override void GenerateField (CodeMemberField e)
  118. {
  119. }
  120. protected override void GenerateFieldReferenceExpression (CodeFieldReferenceExpression e)
  121. {
  122. }
  123. protected override void GenerateGotoStatement (CodeGotoStatement e)
  124. {
  125. }
  126. protected override void GenerateIndexerExpression (CodeIndexerExpression e)
  127. {
  128. }
  129. protected override void GenerateIterationStatement (CodeIterationStatement e)
  130. {
  131. }
  132. protected override void GenerateLabeledStatement (CodeLabeledStatement e)
  133. {
  134. }
  135. protected override void GenerateLinePragmaEnd (CodeLinePragma e)
  136. {
  137. }
  138. protected override void GenerateLinePragmaStart (CodeLinePragma e)
  139. {
  140. }
  141. protected override void GenerateMethod (CodeMemberMethod e, CodeTypeDeclaration c)
  142. {
  143. }
  144. protected override void GenerateMethodInvokeExpression (CodeMethodInvokeExpression e)
  145. {
  146. }
  147. protected override void GenerateMethodReferenceExpression (CodeMethodReferenceExpression e)
  148. {
  149. }
  150. protected override void GenerateMethodReturnStatement (CodeMethodReturnStatement e)
  151. {
  152. }
  153. protected override void GenerateNamespaceEnd (CodeNamespace e)
  154. {
  155. }
  156. protected override void GenerateNamespaceImport (CodeNamespaceImport e)
  157. {
  158. }
  159. protected override void GenerateNamespaceStart (CodeNamespace e)
  160. {
  161. }
  162. protected override void GenerateObjectCreateExpression (CodeObjectCreateExpression e)
  163. {
  164. }
  165. protected override void GenerateProperty (CodeMemberProperty e, CodeTypeDeclaration c)
  166. {
  167. }
  168. protected override void GeneratePropertyReferenceExpression (CodePropertyReferenceExpression e)
  169. {
  170. }
  171. protected override void GeneratePropertySetValueReferenceExpression (CodePropertySetValueReferenceExpression e)
  172. {
  173. }
  174. protected override void GenerateRemoveEventStatement (CodeRemoveEventStatement e)
  175. {
  176. }
  177. protected override void GenerateSnippetExpression (CodeSnippetExpression e)
  178. {
  179. }
  180. protected override void GenerateSnippetMember (CodeSnippetTypeMember e)
  181. {
  182. }
  183. protected override void GenerateThisReferenceExpression (CodeThisReferenceExpression e)
  184. {
  185. }
  186. protected override void GenerateThrowExceptionStatement (CodeThrowExceptionStatement e)
  187. {
  188. }
  189. protected override void GenerateTryCatchFinallyStatement (CodeTryCatchFinallyStatement e)
  190. {
  191. }
  192. protected override void GenerateTypeConstructor (CodeTypeConstructor e)
  193. {
  194. }
  195. protected override void GenerateTypeEnd (CodeTypeDeclaration e)
  196. {
  197. }
  198. protected override void GenerateTypeStart (CodeTypeDeclaration e)
  199. {
  200. }
  201. protected override void GenerateVariableDeclarationStatement (CodeVariableDeclarationStatement e)
  202. {
  203. }
  204. protected override void GenerateVariableReferenceExpression (CodeVariableReferenceExpression e)
  205. {
  206. }
  207. protected override string GetTypeOutput (CodeTypeReference value)
  208. {
  209. return String.Empty;
  210. }
  211. protected override bool IsValidIdentifier (string value)
  212. {
  213. return true;
  214. }
  215. protected override string NullToken {
  216. get { return String.Empty; }
  217. }
  218. protected override void OutputType (CodeTypeReference typeRef)
  219. {
  220. }
  221. protected override string QuoteSnippetString (string value)
  222. {
  223. return String.Empty;
  224. }
  225. protected override bool Supports (GeneratorSupport support)
  226. {
  227. return true;
  228. }
  229. // publicity
  230. public CompilerResults _FromDom (CompilerParameters options, CodeCompileUnit e)
  231. {
  232. return FromDom (options, e);
  233. }
  234. public CompilerResults _FromDomBatch (CompilerParameters options, CodeCompileUnit[] ea)
  235. {
  236. return FromDomBatch (options, ea);
  237. }
  238. public CompilerResults _FromFile (CompilerParameters options, string fileName)
  239. {
  240. return FromFile (options, fileName);
  241. }
  242. public CompilerResults _FromFileBatch (CompilerParameters options, string[] fileNames)
  243. {
  244. return FromFileBatch (options, fileNames);
  245. }
  246. public CompilerResults _FromSource (CompilerParameters options, string source)
  247. {
  248. return FromSource (options, source);
  249. }
  250. public CompilerResults _FromSourceBatch (CompilerParameters options, string[] sources)
  251. {
  252. return FromSourceBatch (options, sources);
  253. }
  254. public string _GetResponseFileCmdArgs (CompilerParameters options, string cmdArgs)
  255. {
  256. return GetResponseFileCmdArgs (options, cmdArgs);
  257. }
  258. static public string _JoinStringArray (string[] sa, string separator)
  259. {
  260. return CodeCompiler.JoinStringArray (sa, separator);
  261. }
  262. }
  263. [TestFixture]
  264. [Category ("CAS")]
  265. public class CodeCompilerCas {
  266. private string filename;
  267. [TestFixtureSetUp]
  268. public void FixtureSetUp ()
  269. {
  270. // at full trust
  271. filename = Path.GetTempFileName ();
  272. }
  273. [SetUp]
  274. public void SetUp ()
  275. {
  276. if (!SecurityManager.SecurityEnabled)
  277. Assert.Ignore ("SecurityManager.SecurityEnabled is OFF");
  278. }
  279. [Test]
  280. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  281. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  282. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  283. [ExpectedException (typeof (InvalidOperationException))]
  284. public void FromDom_PermitOnly ()
  285. {
  286. CodeCompilerTest cc = new CodeCompilerTest ();
  287. cc._FromDom (new CompilerParameters (), new CodeCompileUnit ());
  288. }
  289. [Test]
  290. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  291. [ExpectedException (typeof (SecurityException))]
  292. public void FromDom_Deny_UnmanagedCode ()
  293. {
  294. CodeCompilerTest cc = new CodeCompilerTest ();
  295. cc._FromDom (new CompilerParameters (), new CodeCompileUnit ());
  296. }
  297. [Test]
  298. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  299. [ExpectedException (typeof (SecurityException))]
  300. public void FromDom_Deny_FileIO ()
  301. {
  302. CodeCompilerTest cc = new CodeCompilerTest ();
  303. cc._FromDom (new CompilerParameters (), new CodeCompileUnit ());
  304. }
  305. [Test]
  306. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  307. [ExpectedException (typeof (SecurityException))]
  308. public void FromDom_Deny_Environment ()
  309. {
  310. CodeCompilerTest cc = new CodeCompilerTest ();
  311. cc._FromDom (new CompilerParameters (), new CodeCompileUnit ());
  312. }
  313. [Test]
  314. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  315. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  316. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  317. [ExpectedException (typeof (InvalidOperationException))]
  318. public void FromDomBatch_PermitOnly ()
  319. {
  320. CodeCompilerTest cc = new CodeCompilerTest ();
  321. cc._FromDomBatch (new CompilerParameters (), new CodeCompileUnit[] { new CodeCompileUnit () });
  322. }
  323. [Test]
  324. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  325. [ExpectedException (typeof (SecurityException))]
  326. public void FromDomBatch_Deny_UnmanagedCode ()
  327. {
  328. CodeCompilerTest cc = new CodeCompilerTest ();
  329. cc._FromDomBatch (new CompilerParameters (), new CodeCompileUnit[] { new CodeCompileUnit () });
  330. }
  331. [Test]
  332. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  333. [ExpectedException (typeof (SecurityException))]
  334. public void FromDomBatch_Deny_FileIO ()
  335. {
  336. CodeCompilerTest cc = new CodeCompilerTest ();
  337. cc._FromDomBatch (new CompilerParameters (), new CodeCompileUnit[] { new CodeCompileUnit () });
  338. }
  339. [Test]
  340. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  341. [ExpectedException (typeof (SecurityException))]
  342. public void FromDomBatch_Deny_Environment ()
  343. {
  344. CodeCompilerTest cc = new CodeCompilerTest ();
  345. cc._FromDomBatch (new CompilerParameters (), new CodeCompileUnit[] { new CodeCompileUnit () });
  346. }
  347. [Test]
  348. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  349. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  350. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  351. [ExpectedException (typeof (InvalidOperationException))]
  352. public void FromFile_PermitOnly ()
  353. {
  354. CodeCompilerTest cc = new CodeCompilerTest ();
  355. cc._FromFile (new CompilerParameters (), filename);
  356. }
  357. [Test]
  358. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  359. [ExpectedException (typeof (SecurityException))]
  360. public void FromFile_Deny_UnmanagedCode ()
  361. {
  362. CodeCompilerTest cc = new CodeCompilerTest ();
  363. cc._FromFile (new CompilerParameters (), String.Empty);
  364. }
  365. [Test]
  366. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  367. [ExpectedException (typeof (SecurityException))]
  368. public void FromFile_Deny_FileIO ()
  369. {
  370. CodeCompilerTest cc = new CodeCompilerTest ();
  371. cc._FromFile (new CompilerParameters (), filename);
  372. }
  373. [Test]
  374. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  375. [ExpectedException (typeof (SecurityException))]
  376. public void FromFile_Deny_Environment ()
  377. {
  378. CodeCompilerTest cc = new CodeCompilerTest ();
  379. cc._FromFile (new CompilerParameters (), filename);
  380. }
  381. [Test]
  382. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  383. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  384. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  385. [ExpectedException (typeof (InvalidOperationException))]
  386. public void FromFileBatch_PermitOnly ()
  387. {
  388. CodeCompilerTest cc = new CodeCompilerTest ();
  389. cc._FromFileBatch (new CompilerParameters (), new string[] { String.Empty });
  390. }
  391. [Test]
  392. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  393. [ExpectedException (typeof (SecurityException))]
  394. public void FromFileBatch_Deny_UnmanagedCode ()
  395. {
  396. CodeCompilerTest cc = new CodeCompilerTest ();
  397. cc._FromFileBatch (new CompilerParameters (), new string[] { String.Empty });
  398. }
  399. [Test]
  400. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  401. [ExpectedException (typeof (SecurityException))]
  402. public void FromFileBatch_Deny_FileIO ()
  403. {
  404. CodeCompilerTest cc = new CodeCompilerTest ();
  405. cc._FromFileBatch (new CompilerParameters (), new string[] { String.Empty });
  406. }
  407. [Test]
  408. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  409. [ExpectedException (typeof (SecurityException))]
  410. public void FromFileBatch_Deny_Environment ()
  411. {
  412. CodeCompilerTest cc = new CodeCompilerTest ();
  413. cc._FromFileBatch (new CompilerParameters (), new string[] { String.Empty });
  414. }
  415. [Test]
  416. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  417. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  418. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  419. [ExpectedException (typeof (InvalidOperationException))]
  420. public void FromSource_PermitOnly ()
  421. {
  422. CodeCompilerTest cc = new CodeCompilerTest ();
  423. cc._FromSource (new CompilerParameters (), String.Empty);
  424. }
  425. [Test]
  426. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  427. [ExpectedException (typeof (SecurityException))]
  428. public void FromSource_Deny_UnmanagedCode ()
  429. {
  430. CodeCompilerTest cc = new CodeCompilerTest ();
  431. cc._FromSource (new CompilerParameters (), String.Empty);
  432. }
  433. [Test]
  434. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  435. [ExpectedException (typeof (SecurityException))]
  436. public void FromSource_Deny_FileIO ()
  437. {
  438. CodeCompilerTest cc = new CodeCompilerTest ();
  439. cc._FromSource (new CompilerParameters (), String.Empty);
  440. }
  441. [Test]
  442. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  443. [ExpectedException (typeof (SecurityException))]
  444. public void FromSource_Deny_Environment ()
  445. {
  446. CodeCompilerTest cc = new CodeCompilerTest ();
  447. cc._FromSource (new CompilerParameters (), String.Empty);
  448. }
  449. [Test]
  450. [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)]
  451. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  452. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  453. [ExpectedException (typeof (InvalidOperationException))]
  454. public void FromSourceBatch_PermitOnly ()
  455. {
  456. CodeCompilerTest cc = new CodeCompilerTest ();
  457. cc._FromSourceBatch (new CompilerParameters (), new string[] { String.Empty });
  458. }
  459. [Test]
  460. [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
  461. [ExpectedException (typeof (SecurityException))]
  462. public void FromSourceBatch_Deny_UnmanagedCode ()
  463. {
  464. CodeCompilerTest cc = new CodeCompilerTest ();
  465. cc._FromSourceBatch (new CompilerParameters (), new string[] { String.Empty });
  466. }
  467. [Test]
  468. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  469. [ExpectedException (typeof (SecurityException))]
  470. public void FromSourceBatch_Deny_FileIO ()
  471. {
  472. CodeCompilerTest cc = new CodeCompilerTest ();
  473. cc._FromSourceBatch (new CompilerParameters (), new string[] { String.Empty });
  474. }
  475. [Test]
  476. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  477. [ExpectedException (typeof (SecurityException))]
  478. public void FromSourceBatch_Deny_Environment ()
  479. {
  480. CodeCompilerTest cc = new CodeCompilerTest ();
  481. cc._FromSourceBatch (new CompilerParameters (), new string[] { String.Empty });
  482. }
  483. [Test]
  484. [EnvironmentPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  485. [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)]
  486. public void GetResponseFileCmdArgs_PermitOnly ()
  487. {
  488. CodeCompilerTest cc = new CodeCompilerTest ();
  489. try {
  490. Assert.IsNotNull (cc._GetResponseFileCmdArgs (new CompilerParameters (), String.Empty));
  491. }
  492. catch (NotImplementedException) {
  493. // mono
  494. }
  495. }
  496. [Test]
  497. [EnvironmentPermission (SecurityAction.Deny, Unrestricted = true)]
  498. [ExpectedException (typeof (SecurityException))]
  499. public void GetResponseFileCmdArgs_Deny_Environment ()
  500. {
  501. CodeCompilerTest cc = new CodeCompilerTest ();
  502. try {
  503. cc._GetResponseFileCmdArgs (new CompilerParameters (), String.Empty);
  504. }
  505. catch (NotImplementedException) {
  506. Assert.Ignore ("GetResponseFileCmdArgs not implemented");
  507. }
  508. }
  509. [Test]
  510. [FileIOPermission (SecurityAction.Deny, Unrestricted = true)]
  511. [ExpectedException (typeof (SecurityException))]
  512. public void GetResponseFileCmdArgs_Deny_FileIO ()
  513. {
  514. CodeCompilerTest cc = new CodeCompilerTest ();
  515. try {
  516. cc._GetResponseFileCmdArgs (new CompilerParameters (), String.Empty);
  517. }
  518. catch (NotImplementedException) {
  519. Assert.Ignore ("GetResponseFileCmdArgs not implemented");
  520. }
  521. }
  522. [Test]
  523. [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
  524. public void JoinStringArray ()
  525. {
  526. string[] data = new string[] { "a", "b", "c" };
  527. Assert.AreEqual ("\"a\"#\"b\"#\"c\"", CodeCompilerTest._JoinStringArray (data, "#"), "JoinStringArray");
  528. }
  529. [Test]
  530. [PermissionSet (SecurityAction.Deny, Unrestricted = true)]
  531. public void LinkDemand_Deny_Unrestricted ()
  532. {
  533. ConstructorInfo ci = typeof (CodeCompilerTest).GetConstructor (new Type[0]);
  534. Assert.IsNotNull (ci, "default .ctor()");
  535. Assert.IsNotNull (ci.Invoke (null), "invoke");
  536. }
  537. }
  538. }