-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix StringDictionarySlim enumeration after first item delete (#677)
- Loading branch information
1 parent
dfd0085
commit 47fff2e
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Linq; | ||
using Jint.Native; | ||
using Jint.Native.Object; | ||
using Xunit; | ||
|
||
namespace Jint.Tests.Runtime | ||
{ | ||
public class ObjectInstanceTests | ||
{ | ||
[Fact] | ||
public void RemovingFirstPropertyFromObjectInstancePropertiesBucketAndEnumerating() | ||
{ | ||
var engine = new Engine(); | ||
var instance = new ObjectInstance(engine); | ||
instance.FastAddProperty("bare", JsValue.Null, true, true, true); | ||
instance.FastAddProperty("scope", JsValue.Null, true, true, true); | ||
instance.RemoveOwnProperty("bare"); | ||
var propertyNames = instance.GetOwnProperties().Select(x => x.Key).ToList(); | ||
Assert.Equal(new [] { "scope" }, propertyNames); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters