Skip to content

Commit d5ce8cf

Browse files
committed
Version 1.4.0:
1. Removed following methods: `HasProperty`, `GetPropertyValue`, `SetPropertyValue` and `RemoveProperty`; 2. Fixed bug #3 "execute code from different threads"; 3. Now in the `ChakraJsRt` mode is available a more detailed information about errors; 4. In ECMAScript 5 Polyfill improved a performance of the `String.prototype.trim` function; 5. JSON2 library was updated to version of February 4, 2014.
1 parent 6fb1aa4 commit d5ce8cf

22 files changed

+323
-1355
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change log
22
==========
33

4+
## February 27, 2014 - v1.4.0
5+
* Removed following methods: `HasProperty`, `GetPropertyValue`, `SetPropertyValue` and `RemoveProperty`
6+
* Fixed [bug #3](http://github.com/Taritsyn/MsieJavaScriptEngine/issues/3) "execute code from different threads"
7+
* Now in the `ChakraJsRt` mode is available a more detailed information about errors
8+
* In ECMAScript 5 Polyfill improved a performance of the `String.prototype.trim` function
9+
* JSON2 library was updated to version of February 4, 2014
10+
411
## January 16, 2014 - v1.3.0
512
* Added support of the JsRT version of Chakra
613
* Now the MSIE JavaScript Engine can work in 4 modes: `Auto` (selected by default), `Classic`, `ChakraActiveScript` and `ChakraJsRt`

MsieJavaScriptEngine.Tests/CommonTestsBase.cs

Lines changed: 0 additions & 256 deletions
Original file line numberDiff line numberDiff line change
@@ -607,262 +607,6 @@ public virtual void RemovingVariableIsCorrect()
607607
}
608608
#endregion
609609

610-
#region Getting, setting and removing properties
611-
[Test]
612-
public virtual void SettingAndGettingSimplePropertyWithUndefinedValue()
613-
{
614-
// Arrange
615-
const string objectName = "employee";
616-
const string propertyName = "firstName";
617-
object input = Undefined.Value;
618-
619-
// Act
620-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
621-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
622-
var output = _jsEngine.GetPropertyValue(objectName, propertyName);
623-
624-
// Assert
625-
Assert.IsFalse(propertyExists);
626-
Assert.AreEqual(input, output);
627-
}
628-
629-
[Test]
630-
public virtual void SettingAndGettingSimplePropertyWithNullValue()
631-
{
632-
// Arrange
633-
const string objectName = "employee";
634-
const string propertyName = "firstName";
635-
const string input = null;
636-
637-
// Act
638-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
639-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
640-
var output = _jsEngine.GetPropertyValue(objectName, propertyName);
641-
642-
// Assert
643-
Assert.IsTrue(propertyExists);
644-
Assert.AreEqual(input, output);
645-
}
646-
647-
[Test]
648-
public virtual void SettingAndGettingSimplePropertyWithBooleanValue()
649-
{
650-
// Arrange
651-
const string objectName = "employee";
652-
const string propertyName = "isAdmin";
653-
const bool input = true;
654-
655-
// Act
656-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
657-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
658-
var output = _jsEngine.GetPropertyValue<bool>(objectName, propertyName);
659-
660-
// Assert
661-
Assert.IsTrue(propertyExists);
662-
Assert.AreEqual(input, output);
663-
}
664-
665-
[Test]
666-
public virtual void SettingAndGettingSimplePropertyWithIntegerValue()
667-
{
668-
// Arrange
669-
const string objectName = "employee";
670-
const string propertyName = "age";
671-
const int input = 29;
672-
673-
// Act
674-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
675-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
676-
var output = _jsEngine.GetPropertyValue<int>(objectName, propertyName);
677-
678-
// Assert
679-
Assert.IsTrue(propertyExists);
680-
Assert.AreEqual(input, output);
681-
}
682-
683-
[Test]
684-
public virtual void SettingAndGettingSimplePropertyWithDoubleValue()
685-
{
686-
// Arrange
687-
const string objectName = "employee";
688-
const string propertyName = "salary";
689-
const double input = 3510.75;
690-
691-
// Act
692-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
693-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
694-
var output = _jsEngine.GetPropertyValue<double>(objectName, propertyName);
695-
696-
// Assert
697-
Assert.IsTrue(propertyExists);
698-
Assert.AreEqual(input, output);
699-
}
700-
701-
[Test]
702-
public virtual void SettingAndGettingSimplePropertyWithStringValue()
703-
{
704-
// Arrange
705-
const string objectName = "employee";
706-
const string propertyName = "lastName";
707-
const string input = "Pupkin";
708-
709-
// Act
710-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
711-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
712-
var output = _jsEngine.GetPropertyValue<string>(objectName, propertyName);
713-
714-
// Assert
715-
Assert.IsTrue(propertyExists);
716-
Assert.AreEqual(input, output);
717-
}
718-
719-
[Test]
720-
public virtual void RemovingSimplePropertyIsCorrect()
721-
{
722-
// Arrange
723-
const string objectName = "employee";
724-
const string propertyName = "position";
725-
const string input = "senior manager";
726-
727-
// Act
728-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
729-
bool priceBeforeRemovingExists = _jsEngine.HasProperty(objectName, propertyName);
730-
_jsEngine.RemoveProperty(objectName, propertyName);
731-
bool priceAfterRemovingExists = _jsEngine.HasProperty(objectName, propertyName);
732-
733-
// Assert
734-
Assert.IsTrue(priceBeforeRemovingExists);
735-
Assert.IsFalse(priceAfterRemovingExists);
736-
}
737-
738-
[Test]
739-
public virtual void SettingAndGettingComplexPropertyWithUndefinedValue()
740-
{
741-
// Arrange
742-
const string objectName = "shop";
743-
const string propertyName = "products.headphones.name";
744-
object input = Undefined.Value;
745-
746-
// Act
747-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
748-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
749-
var output = _jsEngine.GetPropertyValue(objectName, propertyName);
750-
751-
// Assert
752-
Assert.IsFalse(propertyExists);
753-
Assert.AreEqual(input, output);
754-
}
755-
756-
[Test]
757-
public virtual void SettingAndGettingComplexPropertyWithNullValue()
758-
{
759-
// Arrange
760-
const string objectName = "shop";
761-
const string propertyName = "products.headphones.name";
762-
const string input = null;
763-
764-
// Act
765-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
766-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
767-
var output = _jsEngine.GetPropertyValue(objectName, propertyName);
768-
769-
// Assert
770-
Assert.IsTrue(propertyExists);
771-
Assert.AreEqual(input, output);
772-
}
773-
774-
[Test]
775-
public virtual void SettingAndGettingComplexPropertyWithBooleanValue()
776-
{
777-
// Arrange
778-
const string objectName = "shop";
779-
const string propertyName = "products.headphones.isVisible";
780-
const bool input = true;
781-
782-
// Act
783-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
784-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
785-
var output = _jsEngine.GetPropertyValue<bool>(objectName, propertyName);
786-
787-
// Assert
788-
Assert.IsTrue(propertyExists);
789-
Assert.AreEqual(input, output);
790-
}
791-
792-
[Test]
793-
public virtual void SettingAndGettingComplexPropertyWithIntegerValue()
794-
{
795-
// Arrange
796-
const string objectName = "shop";
797-
const string propertyName = "products.headphones.amount";
798-
const int input = 38;
799-
800-
// Act
801-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
802-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
803-
var output = _jsEngine.GetPropertyValue<int>(objectName, propertyName);
804-
805-
// Assert
806-
Assert.IsTrue(propertyExists);
807-
Assert.AreEqual(input, output);
808-
}
809-
810-
[Test]
811-
public virtual void SettingAndGettingComplexPropertyWithDoubleValue()
812-
{
813-
// Arrange
814-
const string objectName = "shop";
815-
const string propertyName = "products.headphones.price";
816-
const double input = 120.55;
817-
818-
// Act
819-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
820-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
821-
var output = _jsEngine.GetPropertyValue<double>(objectName, propertyName);
822-
823-
// Assert
824-
Assert.IsTrue(propertyExists);
825-
Assert.AreEqual(input, output);
826-
}
827-
828-
[Test]
829-
public virtual void SettingAndGettingComplexPropertyWithStringValue()
830-
{
831-
// Arrange
832-
const string objectName = "shop";
833-
const string propertyName = "products.headphones.partNumber";
834-
const string input = "BT-342011";
835-
836-
// Act
837-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
838-
bool propertyExists = _jsEngine.HasProperty(objectName, propertyName);
839-
var output = _jsEngine.GetPropertyValue<string>(objectName, propertyName);
840-
841-
// Assert
842-
Assert.IsTrue(propertyExists);
843-
Assert.AreEqual(input, output);
844-
}
845-
846-
[Test]
847-
public virtual void RemovingComplexPropertyIsCorrect()
848-
{
849-
// Arrange
850-
const string objectName = "shop";
851-
const string propertyName = "products.headphones.price";
852-
const double input = 120.55;
853-
854-
// Act
855-
_jsEngine.SetPropertyValue(objectName, propertyName, input);
856-
bool priceBeforeRemovingExists = _jsEngine.HasProperty(objectName, propertyName);
857-
_jsEngine.RemoveProperty(objectName, propertyName);
858-
bool priceAfterRemovingExists = _jsEngine.HasProperty(objectName, propertyName);
859-
860-
// Assert
861-
Assert.IsTrue(priceBeforeRemovingExists);
862-
Assert.IsFalse(priceAfterRemovingExists);
863-
}
864-
#endregion
865-
866610
[TestFixtureTearDown]
867611
public virtual void TearDown()
868612
{

MsieJavaScriptEngine.Tests/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
[assembly: ComVisible(false)]
1414
[assembly: Guid("37677738-d94d-4df9-b32d-61573ece8990")]
1515

16-
[assembly: AssemblyVersion("1.3.0.0")]
17-
[assembly: AssemblyFileVersion("1.3.0.0")]
16+
[assembly: AssemblyVersion("1.4.0.0")]
17+
[assembly: AssemblyFileVersion("1.4.0.0")]

0 commit comments

Comments
 (0)