Skip to content
Browse files

Do not include generic.js with csharp.js. Updated tests.

  • Loading branch information...
1 parent 4b8c7d7 commit 66850bc967c3c503930ed706d057079ecb4ab767 Dan Stewart committed May 9, 2012
Showing with 9 additions and 9 deletions.
  1. +1 −1 js/language/csharp.js
  2. +8 −8 tests/language/csharp-test.js
View
2 js/language/csharp.js
@@ -85,4 +85,4 @@ Rainbow.extend('csharp', [
'name': 'preprocessor',
'pattern': /(\#if|\#else|\#elif|\#endif|\#define|\#undef|\#warning|\#error|\#line|\#region|\#endregion|\#pragma)[\s\S]*?$/gm
}
-]);
+], true);
View
16 tests/language/csharp-test.js
@@ -2,7 +2,7 @@
* C# tests
*
* @author Dan Stewart
- * These tests assume all rainbow js files are loaded.
+ * The csharp.js file is configured to not load generic.js
*/
RainbowTester.startTest('csharp');
@@ -11,7 +11,7 @@ RainbowTester.run(
'Console.WriteLine("hello world");',
- 'Console.<span class="function call">WriteLine</span>(<span class="string">"hello world"</span>);'
+ 'Console.WriteLine(<span class="string">"hello world"</span>);'
);
RainbowTester.run(
@@ -35,7 +35,7 @@ RainbowTester.run(
"var is_array_object = typeof(System.Array);",
- '<span class="keyword">var</span> is_array_object <span class="operator">=</span> <span class="keyword">typeof</span>(System.<span class="keyword">Array</span>);'
+ '<span class="keyword">var</span> is_array_object <span class="operator">=</span> <span class="keyword">typeof</span>(System.Array);'
);
RainbowTester.run(
@@ -109,7 +109,7 @@ RainbowTester.run(
'static void doSomethingElse() {}',
- '<span class="keyword">static</span> <span class="keyword">void</span> <span class="function call">doSomethingElse</span>() {}'
+ '<span class="keyword">static</span> <span class="keyword">void</span> doSomethingElse() {}'
);
RainbowTester.run(
@@ -120,7 +120,7 @@ RainbowTester.run(
' // do whatever\n' +
'}',
- '<span class="keyword">protected</span> <span class="keyword">void</span> <span class="function call">Page_Load</span>(<span class="keyword">object</span> sender, EventArgs e)\n' +
+ '<span class="keyword">protected</span> <span class="keyword">void</span> Page_Load(<span class="keyword">object</span> sender, EventArgs e)\n' +
'{\n' +
' <span class="comment">// do whatever</span>\n' +
'}'
@@ -147,23 +147,23 @@ RainbowTester.run(
'var path = Sonic.App.getInstance();',
- '<span class="keyword">var</span> path <span class="operator">=</span> Sonic.App.<span class="function call">getInstance</span>();'
+ '<span class="keyword">var</span> path <span class="operator">=</span> Sonic.App.getInstance();'
);
RainbowTester.run(
'type hint',
'public static string getForUser(User user, Sort sort) {}',
- '<span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">string</span> <span class="function call">getForUser</span>(User user, Sort sort) {}'
+ '<span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">string</span> getForUser(User user, Sort sort) {}'
);
RainbowTester.run(
'generics',
'public IList&lt;string&gt; firstNames = new List&lt;string&gt;()',
- '<span class="keyword">public</span> IList<span class="keyword operator">&lt;</span><span class="keyword">string</span><span class="keyword operator">&gt;</span> firstNames <span class="operator">=</span> <span class="keyword new">new</span> <span class="support class">List</span><span class="keyword operator">&lt;</span><span class="keyword">string</span><span class="keyword operator">&gt;</span>()'
+ '<span class="keyword">public</span> IList&lt;<span class="keyword">string</span>&gt; firstNames <span class="operator">=</span> <span class="keyword new">new</span> <span class="support class">List</span>&lt;<span class="keyword">string</span>&gt;()'
);
RainbowTester.endTest('csharp');

0 comments on commit 66850bc

Please sign in to comment.
Something went wrong with that request. Please try again.