Author: olivier
Date: 2007-09-28 01:31:49 -0400 (Fri, 28 Sep 2007)
New Revision: 86549
Added:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSCompilerHelpersTest.cs
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSErrorConvertorTest.cs
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSOpsTest.cs
Modified:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/ChangeLog
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSObjectTest.cs
Log:
2006-09-27 Olivier Dufour <[EMAIL PROTECTED]>
* JSCompilerHelpersTest.cs: Added.
* JSErrorConvertorTest.cs: Added.
* JSOpsTest.cs: Added.
Modified:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/ChangeLog
===================================================================
---
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/ChangeLog
2007-09-28 05:30:06 UTC (rev 86548)
+++
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/ChangeLog
2007-09-28 05:31:49 UTC (rev 86549)
@@ -1,3 +1,5 @@
-2006-06-14 Marek Sieradzki <[EMAIL PROTECTED]>
+2006-09-27 Olivier Dufour <[EMAIL PROTECTED]>
- * JSObjectTest.cs: Added.
+ * JSCompilerHelpersTest.cs: Added.
+ * JSErrorConvertorTest.cs: Added.
+ * JSOpsTest.cs: Added.
Added:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSCompilerHelpersTest.cs
===================================================================
---
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSCompilerHelpersTest.cs
2007-09-28 05:30:06 UTC (rev 86548)
+++
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSCompilerHelpersTest.cs
2007-09-28 05:31:49 UTC (rev 86549)
@@ -0,0 +1,125 @@
+//
+// Microsoft.JScript.Runtime
+//
+// Author:
+// Olivier Dufour ([EMAIL PROTECTED])
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using NUnit.Core;
+using NUnit.Framework;
+using Microsoft.JScript.Runtime;
+using MSc = Microsoft.Scripting;
+
+namespace MonoTests.Microsoft.JScript.Runtime
+{
+ [TestFixture]
+ public class JSCompilerHelpersTest
+ {
+ [Test]
+ public void ConstructArrayFromArrayLiteral ()
+ {
+ JSArrayObject result =
JSCompilerHelpers.ConstructArrayFromArrayLiteral (new MSc.CodeContext (new
MSc.Scope (), null), new object[] { });
+ //Assert.AreEqual( result.SymbolAttributes
+
+ }
+
+ [Test]
+ public void ConstructObjectFromLiteral ()
+ {
+
+ }
+
+ [Test]
+ public void Delete ()
+ {
+
+ }
+
+ [Test]
+ public void In ()
+ {
+
+ }
+
+ [Test]
+ public void InstanceOf ()
+ {
+
+ }
+
+ [Test]
+ public void Is ()
+ {
+
+ }
+
+ [Test]
+ public void IsNot ()
+ {
+
+ }
+
+ [Test]
+ public void MakeRegex ()
+ {
+
+ }
+
+ [Test]
+ public void Negate ()
+ {
+
+ }
+
+ [Test]
+ public void Not ()
+ {
+
+ }
+
+ [Test]
+ public void OnesComplement ()
+ {
+
+ }
+
+ [Test]
+ public void Positive ()
+ {
+
+ }
+
+ [Test]
+ public void TypeOf ()
+ {
+
+ }
+
+ [Test]
+ public void Void ()
+ {
+
+ }
+ }
+}
Added:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSErrorConvertorTest.cs
===================================================================
---
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSErrorConvertorTest.cs
2007-09-28 05:30:06 UTC (rev 86548)
+++
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSErrorConvertorTest.cs
2007-09-28 05:31:49 UTC (rev 86549)
@@ -0,0 +1,60 @@
+//
+// Microsoft.JScript.Runtime
+//
+// Author:
+// Olivier Dufour ([EMAIL PROTECTED])
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using NUnit.Core;
+using NUnit.Framework;
+using Microsoft.JScript.Runtime;
+using MSc = Microsoft.Scripting;
+
+namespace MonoTests.Microsoft.JScript.Runtime
+{
+ [TestFixture]
+ public class JSErrorConvertorTest
+ {
+ [Test]
+ public void FormatException ()
+ {
+ Exception ex = new Exception("test message", new
Exception ("inner exception test", null));
+ try {
+ throw ex;
+ } catch (Exception e) {
+ Console.WriteLine (e.StackTrace.ToString());
+
+ MSc.EngineOptions option = new
MSc.EngineOptions();
+ option.ShowClrExceptions = true;
+ string result =
JSErrorConvertor.FormatException (e, option);
+ Assert.AreEqual (" Error: test
message\r\n\r\nCLR Exception\r\nException : test message\r\n" +
e.StackTrace.ToString() +"\r\n", result, "#1");
+ option.ShowClrExceptions = false;
+ result = JSErrorConvertor.FormatException (e,
option);
+ Assert.AreEqual (" Error: test message\r\n",
result, "#2");
+ }
+ }
+ }
+}
Modified:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSObjectTest.cs
===================================================================
---
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSObjectTest.cs
2007-09-28 05:30:06 UTC (rev 86548)
+++
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSObjectTest.cs
2007-09-28 05:31:49 UTC (rev 86549)
@@ -1,11 +1,38 @@
+//
+// Microsoft.JScript.Runtime
+//
+// Author:
+// Olivier Dufour ([EMAIL PROTECTED])
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
using System;
+using Microsoft.JScript.Runtime;
+using NUnit.Framework;
using System.Collections.Generic;
-using System.Text;
-using Microsoft.JScript.Runtime;
using Microsoft.Scripting;
-using NUnit.Framework;
-namespace MonoTests.Microsoft.JScript.Runtime {
+namespace MonoTests.Microsoft.JScript.Runtime
+{
[TestFixture]
public class JSObjectTest {
Added:
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSOpsTest.cs
===================================================================
---
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSOpsTest.cs
2007-09-28 05:30:06 UTC (rev 86548)
+++
trunk/olive/class/Microsoft.JScript.Runtime/Test/Microsoft.JScript.Runtime/JSOpsTest.cs
2007-09-28 05:31:49 UTC (rev 86549)
@@ -0,0 +1,48 @@
+//
+// Microsoft.JScript.Runtime
+//
+// Author:
+// Olivier Dufour ([EMAIL PROTECTED])
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using NUnit.Framework;
+using Microsoft.JScript.Runtime;
+
+namespace MonoTests.Microsoft.JScript.Runtime
+{
+ [TestFixture]
+ public class JSOpsTest
+ {
+ [Test]
+ public void CompareTypes ()
+ {
+ Assert.AreEqual(0, JSOps.CompareTypes (null, null),
"#1");
+ Assert.AreEqual (-1, JSOps.CompareTypes (new object(),
null), "#2");
+ Assert.AreEqual (1, JSOps.CompareTypes (null, new
object ()), "#3");
+
+ }
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches