exercism / exercism/j-test-runner

Sorting issue when `Order` is not a full permutation

Aperta
#33 0 commenti 0 reazioni 1 assegnatario Rivendicata da @eNascimento178 Vedi su GitHub
Lingua principale
J
Stelle
1
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

If the defined `Order` values at the test file does not contains all numbers the JSON file can be sorted incorrectly:

This code below recreates the error:
```
variable_length_quantity_test_01_ignore=: 0
test_variable_length_quantity_test_01 =: monad define
Description@.1 ('zero')
Order@.1 (1)

NB. integers=. 16b0
NB. expected=. 16b0
assert 16b0 = encode 16b0
)

variable_length_quantity_test_02_ignore=: 1 NB. Change this value to 0 to run this test
test_variable_length_quantity_test_02 =: monad define
Description@.1 ('arbitrary single byte')
Order@.1 (3) NB. skip the number two

NB. integers=. 16b40
NB. expected=. 16b40
assert 16b40 = encode 16b40
)
```

Will look at this next week!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.