Skip to content

Commit

Permalink
Version 1.5.4:
Browse files Browse the repository at this point in the history
1. In `ChakraActiveScript` mode added native support of ECMAScript 5 (without polyfills);
2. Added `JsEngineSettings` class for any reason in the future to abandon redundant constructors.
  • Loading branch information
Taritsyn committed Jun 28, 2015
1 parent 8c68e58 commit 0c9e6cc
Show file tree
Hide file tree
Showing 67 changed files with 469 additions and 205 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change log
==========

## June 28, 2015 - v1.5.4
* In `ChakraActiveScript` mode added native support of ECMAScript 5 (without polyfills)
* Added `JsEngineSettings` class for any reason in the future to abandon redundant constructors

## May 5, 2015 - v1.5.3
* JSON2 library was updated to version of May 3, 2015

Expand Down
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/A_Auto/CommonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ public class CommonTests : CommonTestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.Auto, false, false);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.Auto,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/A_Auto/Es5Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class Es5Tests : Es5TestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.Auto, true, true);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.Auto,
UseEcmaScript5Polyfill = true,
UseJson2Library = true
});
}
}
}
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/B_ChakraJsRt/CommonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class CommonTests : CommonTestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.ChakraJsRt);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.ChakraJsRt,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/B_ChakraJsRt/Es5Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class Es5Tests : Es5TestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.ChakraJsRt);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.ChakraJsRt,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class CommonTests : CommonTestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.ChakraActiveScript, false, false);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.ChakraActiveScript,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/C_ChakraActiveScript/Es5Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class Es5Tests : Es5TestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.ChakraActiveScript, true, true);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.ChakraActiveScript,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
16 changes: 8 additions & 8 deletions MsieJavaScriptEngine.Tests/CommonTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public virtual void CallingOfFunctionWithManyParametersIsCorrect()
{
// Arrange
const string functionCode = @"function determineArgumentsTypes() {
var result = '',
var result = '',
argumentIndex,
argumentCount = arguments.length
;
Expand All @@ -334,7 +334,7 @@ public virtual void CallingOfFunctionWithManyParametersIsCorrect()

// Act
_jsEngine.Execute(functionCode);
var output = (string)_jsEngine.CallFunction("determineArgumentsTypes", Undefined.Value, null,
var output = (string)_jsEngine.CallFunction("determineArgumentsTypes", Undefined.Value, null,
true, 12, 3.14, "test");

// Assert
Expand All @@ -346,15 +346,15 @@ public virtual void CallingOfFunctionWithManyParametersAndBooleanResultIsCorrect
{
// Arrange
const string functionCode = @"function and() {
var result = null,
var result = null,
argumentIndex,
argumentCount = arguments.length,
argumentValue
;
for (argumentIndex = 0; argumentIndex < argumentCount; argumentIndex++) {
argumentValue = arguments[argumentIndex];
if (result !== null) {
result = result && argumentValue;
}
Expand All @@ -379,7 +379,7 @@ public virtual void CallingOfFunctionWithManyParametersAndIntegerResultIsCorrect
{
// Arrange
const string functionCode = @"function sum() {
var result = 0,
var result = 0,
argumentIndex,
argumentCount = arguments.length
;
Expand All @@ -404,7 +404,7 @@ public virtual void CallingOfFunctionWithManyParametersAndDoubleResultIsCorrect(
{
// Arrange
const string functionCode = @"function sum() {
var result = 0,
var result = 0,
argumentIndex,
argumentCount = arguments.length
;
Expand All @@ -429,7 +429,7 @@ public virtual void CallingOfFunctionWithManyParametersAndStringResultIsCorrect(
{
// Arrange
const string functionCode = @"function concatenate() {
var result = '',
var result = '',
argumentIndex,
argumentCount = arguments.length
;
Expand Down Expand Up @@ -540,7 +540,7 @@ public virtual void SettingAndGettingVariableWithIntegerValueIsCorrect()

Assert.AreEqual(input2, output2);
}

[Test]
public virtual void SettingAndGettingVariableWithDoubleValueIsCorrect()
{
Expand Down
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/D_Classic/CommonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class CommonTests : CommonTestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.Classic, false, false);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.Classic,
UseEcmaScript5Polyfill = false,
UseJson2Library = false
});
}
}
}
7 changes: 6 additions & 1 deletion MsieJavaScriptEngine.Tests/D_Classic/Es5Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ public class Es5Tests : Es5TestsBase
[TestFixtureSetUp]
public override void SetUp()
{
_jsEngine = new MsieJsEngine(JsEngineMode.Classic, true, true);
_jsEngine = new MsieJsEngine(new JsEngineSettings
{
EngineMode = JsEngineMode.Classic,
UseEcmaScript5Polyfill = true,
UseJson2Library = true
});
}

#region Object methods
Expand Down
12 changes: 6 additions & 6 deletions MsieJavaScriptEngine.Tests/Es5TestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract class Es5TestsBase

[TestFixtureSetUp]
public abstract void SetUp();

#region Array methods

[Test]
Expand Down Expand Up @@ -59,7 +59,7 @@ public virtual void ArrayFilterMethodIsSupported()
// Assert
Assert.AreEqual(targetOutput, output);
}

[Test]
public virtual void ArrayForEachMethodIsSupported()
{
Expand Down Expand Up @@ -285,7 +285,7 @@ public virtual void ArraySomeMethodIsSupported()
}

#endregion

#region Date methods

[Test]
Expand Down Expand Up @@ -324,7 +324,7 @@ public virtual void DateToIsoStringMethodIsSupported()
public virtual void FunctionBindIsSupported()
{
// Arrange
const string initCode = @"var a = 5,
const string initCode = @"var a = 5,
module = {
a: 12,
getA: function() { return this.a; }
Expand All @@ -350,7 +350,7 @@ public virtual void FunctionBindIsSupported()
}

#endregion

#region JSON methods

[Test]
Expand Down Expand Up @@ -436,7 +436,7 @@ public virtual void ObjectCreateMethodIsSupported()
Assert.AreEqual(targetOutput3A, output3A);
Assert.AreEqual(targetOutput3B, output3B);
}

[Test]
public virtual void ObjectKeysMethodIsSupported()
{
Expand Down
4 changes: 2 additions & 2 deletions MsieJavaScriptEngine.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
[assembly: ComVisible(false)]
[assembly: Guid("37677738-d94d-4df9-b32d-61573ece8990")]

[assembly: AssemblyVersion("1.5.1.0")]
[assembly: AssemblyFileVersion("1.5.1.0")]
[assembly: AssemblyVersion("1.5.4.0")]
[assembly: AssemblyFileVersion("1.5.4.0")]
Loading

0 comments on commit 0c9e6cc

Please sign in to comment.