Skip to content

Commit f4384a0

Browse files
committed
Add payload value
1 parent 435b5fc commit f4384a0

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

t/02-insert.t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ subtest {
9999
my class State {
100100
also does Algorithm::MinMaxHeap::Comparable[State];
101101
has Int $.value;
102+
has $.payload;
102103
submethod BUILD(:$!value) { }
103104
method compare-to(State $s) {
104105
if (self.value == $s.value) {
@@ -139,6 +140,7 @@ subtest {
139140
my class State {
140141
also does Algorithm::MinMaxHeap::Comparable[State];
141142
has Int $.value;
143+
has $.payload;
142144
submethod BUILD(:$!value) { }
143145
method compare-to(State $s) {
144146
if (self.value == $s.value) {
@@ -164,6 +166,7 @@ subtest {
164166
my class State {
165167
also does Algorithm::MinMaxHeap::Comparable[State];
166168
has Int $.value;
169+
has $.payload;
167170
submethod BUILD(:$!value) { }
168171
method compare-to(State $s) {
169172
if (self.value == $s.value) {
@@ -189,6 +192,7 @@ subtest {
189192
my class State {
190193
also does Algorithm::MinMaxHeap::Comparable[State];
191194
has Int $.value;
195+
has $.payload;
192196
submethod BUILD(:$!value) { }
193197
method compare-to(State $s) {
194198
if (self.value == $s.value) {

t/03-pop-max.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use Algorithm::MinMaxHeap;
4444
my class State {
4545
also does Algorithm::MinMaxHeap::Comparable[State];
4646
has Int $.value;
47+
has $.payload;
4748
submethod BUILD(:$!value) { }
4849
method compare-to(State $s) {
4950
if (self.value == $s.value) {

t/04-pop-min.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use Algorithm::MinMaxHeap;
4444
my class State {
4545
also does Algorithm::MinMaxHeap::Comparable[State];
4646
has Int $.value;
47+
has $.payload;
4748
submethod BUILD(:$!value) { }
4849
method compare-to(State $s) {
4950
if (self.value == $s.value) {

t/05-find-max.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use Algorithm::MinMaxHeap;
2121
my class State {
2222
also does Algorithm::MinMaxHeap::Comparable[State];
2323
has Int $.value;
24+
has $.payload;
2425
submethod BUILD(:$!value) { }
2526
method compare-to(State $s) {
2627
if (self.value == $s.value) {

t/06-find-min.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use Algorithm::MinMaxHeap;
2121
my class State {
2222
also does Algorithm::MinMaxHeap::Comparable[State];
2323
has Int $.value;
24+
has $.payload;
2425
submethod BUILD(:$!value) { }
2526
method compare-to(State $s) {
2627
if (self.value == $s.value) {

0 commit comments

Comments
 (0)