Permalink
Browse files

Fixing some of the tests

  • Loading branch information...
1 parent 91b851d commit b8d34987f9f9fd91b3e0a8172ceb2d3d211ca564 Frank Laub committed Mar 28, 2010
@@ -32,9 +32,6 @@ public static class Console
[JsCode("console.log(value);")]
public static extern void Write(string value);
- [JsCode("console.log(value);")]
- public static extern void WriteLine(string value);
-
public static void Write(object value) {
Write(value.ToString());
}
@@ -43,6 +40,9 @@ public static class Console
WriteLine(value.ToString());
}
+ [JsCode("console.log(value);")]
+ public static extern void WriteLine(string value);
+
public static void WriteLine(string format, params object[] args) {
WriteLine(string.Format(format, args));
}
@@ -1,9 +1,13 @@
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
$Class(null, 'H8', 'DecorationTests');
H8.DecorationTests.prototype.TestJsAnonymous = function() {
@@ -10,12 +10,55 @@ __f__AnonymousType0$2.prototype.get_Key = function() {
return this._Key_i__Field;
};
+$Class(null, 'System.Text', 'StringBuilder', { value: null });
+
+System.Text.StringBuilder.prototype.$ctor = function() {
+ this.value = "";
+ return this;
+};
+
+System.Text.StringBuilder.prototype.Append$0 = function(value) {
+ var V_1 = value != null;
+ if (!V_1) {
+ return this;
+ }
+ V_1 = value.length != 0;
+ if (!V_1) {
+ this.value = value;
+ return this;
+ }
+ this.value = this.value + value;
+ return this;
+};
+
+System.Text.StringBuilder.prototype.toString = function() {
+ return this.value;
+};
+
+System.Text.StringBuilder.prototype.Append$1 = function(value) {
+ return this.Append$0(value.toString());
+};
+
+__f__AnonymousType0$2.prototype.toString = function() {
+ var V_0 = new System.Text.StringBuilder().$ctor();
+ V_0.Append$0("{ Key = ");
+ V_0.Append$1(this._Key_i__Field);
+ V_0.Append$0(", Value = ");
+ V_0.Append$1(this._Value_i__Field);
+ V_0.Append$0(" }");
+ return V_0.toString();
+};
+
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
__f__AnonymousType0$2.prototype.get_Value = function() {
return this._Value_i__Field;
};
@@ -13,7 +13,7 @@ H8.GeneralTests.prototype.TakeParameters = function(str, value, rad, flag) {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
H8.GeneralTests.prototype.CallTakeParameters = function() {
@@ -11,7 +11,7 @@ System.Console.WriteLine$1 = function(value) {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(DotWeb.Client.JsScript, 'H8', 'GeneralTests_ClientScriptClass');
@@ -33,7 +33,7 @@ H8.GeneralTests_InnerClassTest.prototype.get_Value = function() {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
@@ -33,7 +33,7 @@ H8.OuterClassTest.prototype.get_Value = function() {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
@@ -6,10 +6,14 @@ H8.IndexerTest.prototype.$ctor = function() {
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
H8.GeneralTests.prototype.Indexer = function() {
@@ -10,12 +10,55 @@ __f__AnonymousType0$2.prototype.get_Key = function() {
return this._Key_i__Field;
};
+$Class(null, 'System.Text', 'StringBuilder', { value: null });
+
+System.Text.StringBuilder.prototype.$ctor = function() {
+ this.value = "";
+ return this;
+};
+
+System.Text.StringBuilder.prototype.Append$0 = function(value) {
+ var V_1 = value != null;
+ if (!V_1) {
+ return this;
+ }
+ V_1 = value.length != 0;
+ if (!V_1) {
+ this.value = value;
+ return this;
+ }
+ this.value = this.value + value;
+ return this;
+};
+
+System.Text.StringBuilder.prototype.toString = function() {
+ return this.value;
+};
+
+System.Text.StringBuilder.prototype.Append$1 = function(value) {
+ return this.Append$0(value.toString());
+};
+
+__f__AnonymousType0$2.prototype.toString = function() {
+ var V_0 = new System.Text.StringBuilder().$ctor();
+ V_0.Append$0("{ Key = ");
+ V_0.Append$1(this._Key_i__Field);
+ V_0.Append$0(", Value = ");
+ V_0.Append$1(this._Value_i__Field);
+ V_0.Append$0(" }");
+ return V_0.toString();
+};
+
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
__f__AnonymousType0$2.prototype.get_Value = function() {
return this._Value_i__Field;
};
@@ -13,7 +13,7 @@ H8.GeneralTests.prototype.TakeParameters = function(str, value, rad, flag) {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
H8.GeneralTests.prototype.CallTakeParameters = function() {
@@ -11,7 +11,7 @@ System.Console.WriteLine$1 = function(value) {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(DotWeb.Client.JsScript, 'H8', 'GeneralTests_ClientScriptClass');
@@ -33,7 +33,7 @@ H8.GeneralTests_InnerClassTest.prototype.get_Value = function() {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
@@ -33,7 +33,7 @@ H8.OuterClassTest.prototype.get_Value = function() {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
@@ -6,10 +6,14 @@ H8.IndexerTest.prototype.$ctor = function() {
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
H8.GeneralTests.prototype.Indexer = function() {
@@ -217,7 +217,8 @@ System.Collections.Generic.Dictionary$2_Enumerator.prototype.MoveNext = function
};
System.Collections.Generic.Dictionary$2_Enumerator.prototype.get_Current = function() {
-}
+ return this.current;
+};
System.Collections.Generic.KeyValuePair$2.prototype.get_Key = function() {
return this._Key_k__BackingField;
@@ -700,17 +701,17 @@ System.Exception.prototype.toString = function() {
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
-System.Console.WriteLine$1 = function(value) {
- System.Console.WriteLine$0(value.toString());
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'H8', 'GeneralTests', { SimpleEvent: null });
H8.GeneralTests.prototype.TestDictionaryEnumerator = function() {
var dict = new System.Collections.Generic.Dictionary$2().$ctor$3(1);
- System.Console.WriteLine$1(dict);
+ System.Console.WriteLine$0(dict);
};
@@ -19,10 +19,14 @@ System.Collections.Generic.List$1.prototype.toString = function() {
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
$Class(null, 'H8', 'SystemTests');
H8.SystemTests.prototype.AreEqual = function(name, expected, actual) {
@@ -24,7 +24,7 @@ System.Collections.Generic.List$1.prototype.IndexOf$0 = function(item) {
};
System.Console.WriteLine$0 = function(value) {
- console.log(value);
+ System.Console.WriteLine$1(value.toString());
};
$Class(null, 'System.Collections.Generic', 'List$1___c__DisplayClass5', { foundFirst: 0, item: null });
@@ -1,9 +1,13 @@
$Class(null, 'System', 'Console');
-System.Console.WriteLine$0 = function(value) {
+System.Console.WriteLine$1 = function(value) {
console.log(value);
};
+System.Console.WriteLine$0 = function(value) {
+ System.Console.WriteLine$1(value.toString());
+};
+
$Class(null, 'System', 'Exception', { message: null, _InnerException_k__BackingField: null, _Source_k__BackingField: null, _StackTrace_k__BackingField: null });
System.Exception.prototype.set_Message = function(value) {
@@ -67,10 +71,6 @@ String.prototype._Substring$0 = function(startIndex) {
return this.substring(startIndex, this.length);
};
-System.Console.WriteLine$1 = function(value) {
- console.log(value);
-};
-
$Class(null, 'H8', 'SystemTests');
H8.SystemTests.prototype.TestString = function() {

0 comments on commit b8d3498

Please sign in to comment.