Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Commit

Permalink
shift,unshift, slice did not fire changed for specific items
Browse files Browse the repository at this point in the history
  • Loading branch information
boekkooi committed May 25, 2013
1 parent 6e9d79e commit f6fa031
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 102 deletions.
76 changes: 56 additions & 20 deletions docs/reactive-array-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Empty constructor</p>
<p>Empty constructor</p>

</div>

Expand All @@ -99,7 +99,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>length assign</p>
<p>length assign</p>

</div>

Expand All @@ -124,7 +124,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>push</p>
<p>push</p>

</div>

Expand All @@ -144,7 +144,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>pop</p>
<p>pop</p>

</div>

Expand All @@ -161,7 +161,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>shift</p>
<p>shift</p>

</div>

Expand All @@ -178,7 +178,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>unshift</p>
<p>unshift</p>

</div>

Expand All @@ -194,7 +194,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>splice</p>
<p>splice</p>

</div>

Expand All @@ -211,7 +211,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>bracket assign (index must exists)</p>
<p>bracket assign (index must exists)</p>

</div>

Expand All @@ -229,7 +229,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>sort</p>
<p>sort</p>

</div>

Expand All @@ -249,7 +249,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>length dep</p>
<p>length dep</p>

</div>

Expand All @@ -268,7 +268,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>indexOf dep</p>
<p>indexOf dep</p>

</div>

Expand All @@ -287,7 +287,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>lastIndexOf dep</p>
<p>lastIndexOf dep</p>

</div>

Expand All @@ -306,7 +306,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>add first item</p>
<p>add first item</p>

</div>

Expand All @@ -325,7 +325,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>bracket get dep</p>
<p>bracket get dep</p>

</div>

Expand All @@ -344,7 +344,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>add second item</p>
<p>add second item</p>

</div>

Expand All @@ -364,7 +364,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>add third item</p>
<p>add third item</p>

</div>

Expand All @@ -384,7 +384,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>add fourth item</p>
<p>add fourth item</p>

</div>

Expand All @@ -404,7 +404,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>change first</p>
<p>change first</p>

</div>

Expand All @@ -424,7 +424,7 @@ <h1>reactive-array-test.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>sort</p>
<p>sort</p>

</div>

Expand All @@ -433,7 +433,43 @@ <h1>reactive-array-test.coffee</h1>
test.equal bracketX, <span class="number">3</span>
test.equal lengthX, <span class="number">5</span>
test.equal indexOfX, <span class="number">5</span>, <span class="string">'sort changes all (not really but i\'m lazy)'</span>
test.equal lastIndexOfX, <span class="number">6</span>, <span class="string">'sort changes all (not really but i\'m lazy)'</span>
test.equal lastIndexOfX, <span class="number">6</span>, <span class="string">'sort changes all (not really but i\'m lazy)'</span></pre></div></div>

</li>


<li id="section-21">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>shift</p>

</div>

<div class="content"><div class='highlight'><pre> arr.unshift(<span class="string">'drink'</span>)
Deps.flush()
test.equal lengthX, <span class="number">6</span>
test.equal bracketX, <span class="number">4</span></pre></div></div>

</li>


<li id="section-22">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>unshift</p>

</div>

<div class="content"><div class='highlight'><pre> test.equal arr.shift(), <span class="string">'drink'</span>
Deps.flush()
test.equal lengthX, <span class="number">7</span>
test.equal bracketX, <span class="number">5</span>

Tinytest.add <span class="string">"ReactiveArray - Sort/Reverse"</span>, (test) -&gt;
arr = <span class="keyword">new</span> ReactiveArray <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>
Expand Down
Loading

0 comments on commit f6fa031

Please sign in to comment.