trackler 2.2.1.171 → 2.2.1.172
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/go/exercises/dominoes/.meta/gen.go +1 -1
- data/tracks/go/exercises/dominoes/cases_test.go +11 -11
- data/tracks/ocaml/config.json +1 -1
- data/tracks/ocaml/docs/ABOUT.md +6 -4
- data/tracks/powershell/config.json +3 -2
- data/tracks/rust/bin/format_exercises +31 -0
- data/tracks/rust/config.json +10 -2
- data/tracks/rust/config/exercise_readme.go.tmpl +26 -5
- data/tracks/rust/exercises/accumulate/README.md +26 -5
- data/tracks/rust/exercises/accumulate/src/lib.rs +1 -0
- data/tracks/rust/exercises/accumulate/tests/accumulate.rs +7 -7
- data/tracks/rust/exercises/acronym/README.md +26 -5
- data/tracks/rust/exercises/acronym/src/lib.rs +1 -0
- data/tracks/rust/exercises/acronym/tests/acronym.rs +10 -5
- data/tracks/rust/exercises/all-your-base/README.md +26 -5
- data/tracks/rust/exercises/all-your-base/src/lib.rs +6 -1
- data/tracks/rust/exercises/all-your-base/tests/all-your-base.rs +68 -34
- data/tracks/rust/exercises/allergies/README.md +26 -5
- data/tracks/rust/exercises/allergies/src/lib.rs +1 -0
- data/tracks/rust/exercises/allergies/tests/allergies.rs +34 -26
- data/tracks/rust/exercises/alphametics/README.md +26 -5
- data/tracks/rust/exercises/alphametics/tests/alphametics.rs +44 -9
- data/tracks/rust/exercises/anagram/README.md +26 -5
- data/tracks/rust/exercises/anagram/src/lib.rs +1 -0
- data/tracks/rust/exercises/anagram/tests/anagram.rs +15 -4
- data/tracks/rust/exercises/armstrong-numbers/README.md +26 -5
- data/tracks/rust/exercises/atbash-cipher/README.md +26 -5
- data/tracks/rust/exercises/atbash-cipher/src/lib.rs +1 -1
- data/tracks/rust/exercises/atbash-cipher/tests/atbash-cipher.rs +16 -8
- data/tracks/rust/exercises/beer-song/README.md +26 -5
- data/tracks/rust/exercises/binary-search/README.md +26 -5
- data/tracks/rust/exercises/binary-search/src/lib.rs +1 -0
- data/tracks/rust/exercises/binary-search/tests/binary-search.rs +8 -4
- data/tracks/rust/exercises/bob/README.md +26 -5
- data/tracks/rust/exercises/bob/tests/bob.rs +32 -15
- data/tracks/rust/exercises/book-store/README.md +26 -5
- data/tracks/rust/exercises/book-store/src/lib.rs +4 -1
- data/tracks/rust/exercises/book-store/tests/book-store.rs +52 -24
- data/tracks/rust/exercises/bowling/README.md +26 -5
- data/tracks/rust/exercises/bowling/src/lib.rs +1 -2
- data/tracks/rust/exercises/bowling/tests/bowling.rs +2 -1
- data/tracks/rust/exercises/bracket-push/README.md +29 -7
- data/tracks/rust/exercises/bracket-push/src/lib.rs +1 -0
- data/tracks/rust/exercises/circular-buffer/README.md +26 -5
- data/tracks/rust/exercises/circular-buffer/src/lib.rs +1 -0
- data/tracks/rust/exercises/clock/README.md +26 -5
- data/tracks/rust/exercises/clock/src/lib.rs +1 -0
- data/tracks/rust/exercises/clock/tests/clock.rs +0 -1
- data/tracks/rust/exercises/collatz-conjecture/README.md +26 -5
- data/tracks/rust/exercises/crypto-square/README.md +53 -29
- data/tracks/rust/exercises/custom-set/README.md +26 -5
- data/tracks/rust/exercises/custom-set/src/lib.rs +1 -0
- data/tracks/rust/exercises/decimal/README.md +26 -5
- data/tracks/rust/exercises/decimal/tests/decimal.rs +4 -7
- data/tracks/rust/exercises/diamond/README.md +26 -5
- data/tracks/rust/exercises/difference-of-squares/README.md +26 -5
- data/tracks/rust/exercises/difference-of-squares/src/lib.rs +1 -1
- data/tracks/rust/exercises/diffie-hellman/README.md +26 -5
- data/tracks/rust/exercises/diffie-hellman/src/lib.rs +12 -2
- data/tracks/rust/exercises/diffie-hellman/tests/diffie-hellman.rs +3 -3
- data/tracks/rust/exercises/dominoes/README.md +26 -5
- data/tracks/rust/exercises/dominoes/src/lib.rs +1 -0
- data/tracks/rust/exercises/dominoes/tests/dominoes.rs +29 -13
- data/tracks/rust/exercises/etl/README.md +26 -5
- data/tracks/rust/exercises/etl/src/lib.rs +1 -0
- data/tracks/rust/exercises/etl/tests/etl.rs +39 -34
- data/tracks/rust/exercises/forth/README.md +26 -5
- data/tracks/rust/exercises/forth/tests/forth.rs +17 -65
- data/tracks/rust/exercises/gigasecond/README.md +26 -5
- data/tracks/rust/exercises/gigasecond/tests/gigasecond.rs +31 -10
- data/tracks/rust/exercises/grade-school/README.md +26 -5
- data/tracks/rust/exercises/grade-school/src/lib.rs +1 -2
- data/tracks/rust/exercises/grade-school/tests/grade-school.rs +5 -9
- data/tracks/rust/exercises/grains/README.md +26 -5
- data/tracks/rust/exercises/hamming/README.md +30 -8
- data/tracks/rust/exercises/hamming/src/lib.rs +1 -2
- data/tracks/rust/exercises/hello-world/README.md +26 -5
- data/tracks/rust/exercises/hexadecimal/README.md +26 -5
- data/tracks/rust/exercises/hexadecimal/src/lib.rs +1 -0
- data/tracks/rust/exercises/isbn-verifier/README.md +26 -5
- data/tracks/rust/exercises/isogram/README.md +26 -5
- data/tracks/rust/exercises/isogram/src/lib.rs +1 -1
- data/tracks/rust/exercises/isogram/tests/isogram.rs +36 -24
- data/tracks/rust/exercises/largest-series-product/README.md +26 -5
- data/tracks/rust/exercises/largest-series-product/src/lib.rs +5 -1
- data/tracks/rust/exercises/largest-series-product/tests/largest-series-product.rs +4 -2
- data/tracks/rust/exercises/leap/README.md +26 -5
- data/tracks/rust/exercises/luhn-from/README.md +26 -5
- data/tracks/rust/exercises/luhn-from/src/lib.rs +1 -0
- data/tracks/rust/exercises/luhn-trait/README.md +26 -5
- data/tracks/rust/exercises/luhn-trait/src/lib.rs +1 -0
- data/tracks/rust/exercises/luhn/README.md +26 -5
- data/tracks/rust/exercises/luhn/src/lib.rs +1 -1
- data/tracks/rust/exercises/macros/README.md +26 -5
- data/tracks/rust/exercises/minesweeper/README.md +26 -5
- data/tracks/rust/exercises/minesweeper/src/lib.rs +1 -0
- data/tracks/rust/exercises/nth-prime/README.md +26 -5
- data/tracks/rust/exercises/nucleotide-codons/README.md +26 -5
- data/tracks/rust/exercises/nucleotide-codons/src/lib.rs +1 -0
- data/tracks/rust/exercises/nucleotide-codons/tests/codons.rs +6 -5
- data/tracks/rust/exercises/nucleotide-count/README.md +26 -5
- data/tracks/rust/exercises/nucleotide-count/src/lib.rs +1 -0
- data/tracks/rust/exercises/nucleotide-count/tests/nucleotide-count.rs +5 -8
- data/tracks/rust/exercises/ocr-numbers/README.md +26 -5
- data/tracks/rust/exercises/ocr-numbers/tests/ocr-numbers.rs +0 -1
- data/tracks/rust/exercises/palindrome-products/README.md +26 -5
- data/tracks/rust/exercises/pangram/README.md +26 -5
- data/tracks/rust/exercises/pangram/src/lib.rs +1 -1
- data/tracks/rust/exercises/parallel-letter-frequency/README.md +26 -5
- data/tracks/rust/exercises/parallel-letter-frequency/benches/benchmark.rs +6 -3
- data/tracks/rust/exercises/parallel-letter-frequency/src/lib.rs +1 -0
- data/tracks/rust/exercises/parallel-letter-frequency/tests/parallel-letter-frequency.rs +6 -3
- data/tracks/rust/exercises/pascals-triangle/README.md +26 -5
- data/tracks/rust/exercises/pascals-triangle/tests/pascals-triangle.rs +36 -28
- data/tracks/rust/exercises/perfect-numbers/README.md +26 -5
- data/tracks/rust/exercises/perfect-numbers/src/lib.rs +1 -1
- data/tracks/rust/exercises/perfect-numbers/tests/perfect-numbers.rs +1 -2
- data/tracks/rust/exercises/phone-number/README.md +26 -5
- data/tracks/rust/exercises/phone-number/src/lib.rs +1 -0
- data/tracks/rust/exercises/pig-latin/README.md +26 -5
- data/tracks/rust/exercises/pig-latin/src/lib.rs +1 -0
- data/tracks/rust/exercises/poker/README.md +26 -5
- data/tracks/rust/exercises/poker/tests/poker.rs +27 -104
- data/tracks/rust/exercises/prime-factors/README.md +26 -5
- data/tracks/rust/exercises/protein-translation/README.md +26 -5
- data/tracks/rust/exercises/protein-translation/src/lib.rs +1 -0
- data/tracks/rust/exercises/protein-translation/tests/proteins.rs +16 -9
- data/tracks/rust/exercises/proverb/README.md +26 -5
- data/tracks/rust/exercises/proverb/tests/proverb.rs +1 -7
- data/tracks/rust/exercises/pythagorean-triplet/README.md +26 -5
- data/tracks/rust/exercises/queen-attack/README.md +26 -5
- data/tracks/rust/exercises/queen-attack/src/lib.rs +1 -0
- data/tracks/rust/exercises/raindrops/README.md +26 -5
- data/tracks/rust/exercises/raindrops/tests/raindrops.rs +57 -19
- data/tracks/rust/exercises/react/README.md +26 -5
- data/tracks/rust/exercises/react/src/lib.rs +16 -4
- data/tracks/rust/exercises/react/tests/react.rs +174 -43
- data/tracks/rust/exercises/rectangles/README.md +26 -5
- data/tracks/rust/exercises/rectangles/src/lib.rs +1 -0
- data/tracks/rust/exercises/reverse-string/README.md +26 -5
- data/tracks/rust/exercises/reverse-string/tests/reverse-string.rs +2 -11
- data/tracks/rust/exercises/rna-transcription/README.md +26 -5
- data/tracks/rust/exercises/rna-transcription/src/lib.rs +1 -0
- data/tracks/rust/exercises/robot-name/README.md +26 -5
- data/tracks/rust/exercises/robot-name/src/lib.rs +1 -0
- data/tracks/rust/exercises/robot-name/tests/robot-name.rs +8 -2
- data/tracks/rust/exercises/robot-simulator/README.md +26 -5
- data/tracks/rust/exercises/robot-simulator/src/lib.rs +5 -6
- data/tracks/rust/exercises/roman-numerals/README.md +26 -5
- data/tracks/rust/exercises/roman-numerals/src/lib.rs +1 -0
- data/tracks/rust/exercises/rotational-cipher/README.md +26 -5
- data/tracks/rust/exercises/rotational-cipher/src/lib.rs +1 -0
- data/tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs +12 -4
- data/tracks/rust/exercises/run-length-encoding/README.md +26 -5
- data/tracks/rust/exercises/run-length-encoding/src/lib.rs +1 -1
- data/tracks/rust/exercises/run-length-encoding/tests/run-length-encoding.rs +12 -5
- data/tracks/rust/exercises/saddle-points/README.md +26 -5
- data/tracks/rust/exercises/saddle-points/src/lib.rs +4 -1
- data/tracks/rust/exercises/say/README.md +27 -6
- data/tracks/rust/exercises/say/src/lib.rs +1 -1
- data/tracks/rust/exercises/say/tests/say.rs +30 -14
- data/tracks/rust/exercises/scrabble-score/README.md +26 -5
- data/tracks/rust/exercises/scrabble-score/src/lib.rs +1 -1
- data/tracks/rust/exercises/series/README.md +32 -11
- data/tracks/rust/exercises/series/src/lib.rs +5 -1
- data/tracks/rust/exercises/sieve/README.md +31 -8
- data/tracks/rust/exercises/sieve/src/lib.rs +1 -0
- data/tracks/rust/exercises/sieve/tests/sieve.rs +11 -12
- data/tracks/rust/exercises/simple-cipher/README.md +26 -5
- data/tracks/rust/exercises/simple-cipher/src/lib.rs +6 -3
- data/tracks/rust/exercises/simple-cipher/tests/simple-cipher.rs +0 -1
- data/tracks/rust/exercises/simple-linked-list/README.md +26 -5
- data/tracks/rust/exercises/simple-linked-list/src/lib.rs +0 -1
- data/tracks/rust/exercises/simple-linked-list/tests/simple-linked-list.rs +0 -1
- data/tracks/rust/exercises/space-age/README.md +26 -5
- data/tracks/rust/exercises/space-age/tests/space-age.rs +4 -4
- data/tracks/rust/exercises/spiral-matrix/README.md +26 -5
- data/tracks/rust/exercises/sublist/README.md +26 -5
- data/tracks/rust/exercises/sublist/src/lib.rs +1 -0
- data/tracks/rust/exercises/sublist/tests/sublist.rs +17 -68
- data/tracks/rust/exercises/sum-of-multiples/README.md +26 -5
- data/tracks/rust/exercises/sum-of-multiples/src/lib.rs +5 -1
- data/tracks/rust/exercises/tournament/README.md +26 -5
- data/tracks/rust/exercises/tournament/src/lib.rs +1 -0
- data/tracks/rust/exercises/tournament/tests/tournament.rs +60 -60
- data/tracks/rust/exercises/triangle/README.md +26 -5
- data/tracks/rust/exercises/triangle/src/lib.rs +1 -0
- data/tracks/rust/exercises/two-bucket/README.md +26 -5
- data/tracks/rust/exercises/two-bucket/src/lib.rs +2 -6
- data/tracks/rust/exercises/two-bucket/tests/two-bucket.rs +49 -37
- data/tracks/rust/exercises/twofer/README.md +33 -7
- data/tracks/rust/exercises/twofer/src/lib.rs +2 -2
- data/tracks/rust/exercises/twofer/tests/two-fer.rs +2 -2
- data/tracks/rust/exercises/variable-length-quantity/README.md +26 -5
- data/tracks/rust/exercises/variable-length-quantity/tests/variable-length-quantity.rs +60 -32
- data/tracks/rust/exercises/word-count/README.md +26 -5
- data/tracks/rust/exercises/word-count/src/lib.rs +1 -1
- data/tracks/rust/exercises/word-count/tests/word-count.rs +15 -23
- data/tracks/rust/exercises/wordy/README.md +26 -5
- data/tracks/rust/exercises/wordy/src/lib.rs +1 -0
- metadata +3 -2
@@ -39,11 +39,31 @@ Execute the tests with:
|
|
39
39
|
$ cargo test
|
40
40
|
```
|
41
41
|
|
42
|
-
All but the first test have been ignored.
|
43
|
-
pass,
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
All but the first test have been ignored. After you get the first test to
|
43
|
+
pass, open the tests source file wich is located in the `tests` directory
|
44
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
45
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
46
|
+
Continue, until you pass every test.
|
47
|
+
|
48
|
+
If you wish to run all tests without editing the tests source file, use:
|
49
|
+
|
50
|
+
```bash
|
51
|
+
$ cargo test -- --ignored
|
52
|
+
```
|
53
|
+
|
54
|
+
To run a specific test, for example `some_test`, you can use:
|
55
|
+
|
56
|
+
```bash
|
57
|
+
$ cargo test some_test
|
58
|
+
```
|
59
|
+
|
60
|
+
If the specfic test is ignored use:
|
61
|
+
|
62
|
+
```bash
|
63
|
+
$ cargo test some_test -- --ignored
|
64
|
+
```
|
65
|
+
|
66
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
47
67
|
|
48
68
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
49
69
|
haven't already, it will help you with organizing your files.
|
@@ -57,6 +77,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
57
77
|
[help-page]: http://exercism.io/languages/rust
|
58
78
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
59
79
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
80
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
60
81
|
|
61
82
|
## Submitting Incomplete Solutions
|
62
83
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -21,11 +21,31 @@ Execute the tests with:
|
|
21
21
|
$ cargo test
|
22
22
|
```
|
23
23
|
|
24
|
-
All but the first test have been ignored.
|
25
|
-
pass,
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
All but the first test have been ignored. After you get the first test to
|
25
|
+
pass, open the tests source file wich is located in the `tests` directory
|
26
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
27
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
28
|
+
Continue, until you pass every test.
|
29
|
+
|
30
|
+
If you wish to run all tests without editing the tests source file, use:
|
31
|
+
|
32
|
+
```bash
|
33
|
+
$ cargo test -- --ignored
|
34
|
+
```
|
35
|
+
|
36
|
+
To run a specific test, for example `some_test`, you can use:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
$ cargo test some_test
|
40
|
+
```
|
41
|
+
|
42
|
+
If the specfic test is ignored use:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
$ cargo test some_test -- --ignored
|
46
|
+
```
|
47
|
+
|
48
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
29
49
|
|
30
50
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
31
51
|
haven't already, it will help you with organizing your files.
|
@@ -39,6 +59,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
39
59
|
[help-page]: http://exercism.io/languages/rust
|
40
60
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
41
61
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
62
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
42
63
|
|
43
64
|
## Source
|
44
65
|
|
@@ -31,11 +31,31 @@ Execute the tests with:
|
|
31
31
|
$ cargo test
|
32
32
|
```
|
33
33
|
|
34
|
-
All but the first test have been ignored.
|
35
|
-
pass,
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
All but the first test have been ignored. After you get the first test to
|
35
|
+
pass, open the tests source file wich is located in the `tests` directory
|
36
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
37
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
38
|
+
Continue, until you pass every test.
|
39
|
+
|
40
|
+
If you wish to run all tests without editing the tests source file, use:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
$ cargo test -- --ignored
|
44
|
+
```
|
45
|
+
|
46
|
+
To run a specific test, for example `some_test`, you can use:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
$ cargo test some_test
|
50
|
+
```
|
51
|
+
|
52
|
+
If the specfic test is ignored use:
|
53
|
+
|
54
|
+
```bash
|
55
|
+
$ cargo test some_test -- --ignored
|
56
|
+
```
|
57
|
+
|
58
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
39
59
|
|
40
60
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
41
61
|
haven't already, it will help you with organizing your files.
|
@@ -49,6 +69,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
49
69
|
[help-page]: http://exercism.io/languages/rust
|
50
70
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
51
71
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
72
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
52
73
|
|
53
74
|
## Submitting Incomplete Solutions
|
54
75
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -15,7 +15,8 @@ fn test_cysteine_tgt() {
|
|
15
15
|
|
16
16
|
#[test]
|
17
17
|
#[ignore]
|
18
|
-
fn test_cysteine_tgy() {
|
18
|
+
fn test_cysteine_tgy() {
|
19
|
+
// "compressed" name for TGT and TGC
|
19
20
|
let info = codons::parse(make_pairs());
|
20
21
|
assert_eq!(info.name_for("TGT"), info.name_for("TGY"));
|
21
22
|
assert_eq!(info.name_for("TGC"), info.name_for("TGY"));
|
@@ -35,7 +36,6 @@ fn test_valine() {
|
|
35
36
|
assert_eq!(info.name_for("GTN"), Ok("valine"));
|
36
37
|
}
|
37
38
|
|
38
|
-
|
39
39
|
#[test]
|
40
40
|
#[ignore]
|
41
41
|
fn test_isoleucine() {
|
@@ -104,13 +104,14 @@ fn make_pairs() -> Vec<(&'static str, &'static str)> {
|
|
104
104
|
("aspartic acid", vec!["GAT", "GAC"]),
|
105
105
|
("lysine", vec!["AAA", "AAG"]),
|
106
106
|
("arginine", vec!["CGT", "CGC", "CGA", "CGG", "AGA", "AGG"]),
|
107
|
-
("stop codon", vec!["TAA", "TAG", "TGA"])
|
107
|
+
("stop codon", vec!["TAA", "TAG", "TGA"]),
|
108
|
+
];
|
108
109
|
let mut pairs = Vec::<(&'static str, &'static str)>::new();
|
109
110
|
for (name, codons) in grouped.into_iter() {
|
110
111
|
for codon in codons {
|
111
112
|
pairs.push((codon, name));
|
112
113
|
}
|
113
|
-
}
|
114
|
+
}
|
114
115
|
pairs.sort_by(|&(_, a), &(_, b)| a.cmp(b));
|
115
|
-
return pairs
|
116
|
+
return pairs;
|
116
117
|
}
|
@@ -25,11 +25,31 @@ Execute the tests with:
|
|
25
25
|
$ cargo test
|
26
26
|
```
|
27
27
|
|
28
|
-
All but the first test have been ignored.
|
29
|
-
pass,
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
All but the first test have been ignored. After you get the first test to
|
29
|
+
pass, open the tests source file wich is located in the `tests` directory
|
30
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
31
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
32
|
+
Continue, until you pass every test.
|
33
|
+
|
34
|
+
If you wish to run all tests without editing the tests source file, use:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
$ cargo test -- --ignored
|
38
|
+
```
|
39
|
+
|
40
|
+
To run a specific test, for example `some_test`, you can use:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
$ cargo test some_test
|
44
|
+
```
|
45
|
+
|
46
|
+
If the specfic test is ignored use:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
$ cargo test some_test -- --ignored
|
50
|
+
```
|
51
|
+
|
52
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
33
53
|
|
34
54
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
35
55
|
haven't already, it will help you with organizing your files.
|
@@ -43,6 +63,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
43
63
|
[help-page]: http://exercism.io/languages/rust
|
44
64
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
45
65
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
66
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
46
67
|
|
47
68
|
## Source
|
48
69
|
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -12,7 +12,7 @@ fn check_dna(s: &str, pairs: &[(char, usize)]) {
|
|
12
12
|
assert_eq!((k, m.remove(&k)), (k, Some(v)));
|
13
13
|
}
|
14
14
|
// may fail with a message that clearly shows all extra pairs in the map
|
15
|
-
assert_eq!(m.iter().collect::<Vec<(&char
|
15
|
+
assert_eq!(m.iter().collect::<Vec<(&char, &usize)>>(), vec![]);
|
16
16
|
}
|
17
17
|
|
18
18
|
#[test]
|
@@ -59,17 +59,13 @@ fn counts_returns_result() {
|
|
59
59
|
#[test]
|
60
60
|
#[ignore]
|
61
61
|
fn test_nucleotide_count_empty() {
|
62
|
-
check_dna(
|
63
|
-
"",
|
64
|
-
&[('A', 0), ('T', 0), ('C', 0), ('G', 0)]);
|
62
|
+
check_dna("", &[('A', 0), ('T', 0), ('C', 0), ('G', 0)]);
|
65
63
|
}
|
66
64
|
|
67
65
|
#[test]
|
68
66
|
#[ignore]
|
69
67
|
fn test_nucleotide_count_only_guanine() {
|
70
|
-
check_dna(
|
71
|
-
"GGGGGGGG",
|
72
|
-
&[('A', 0), ('T', 0), ('C', 0), ('G', 8)]);
|
68
|
+
check_dna("GGGGGGGG", &[('A', 0), ('T', 0), ('C', 0), ('G', 8)]);
|
73
69
|
}
|
74
70
|
|
75
71
|
#[test]
|
@@ -78,7 +74,8 @@ fn test_nucleotide_count_counts_all() {
|
|
78
74
|
check_dna(
|
79
75
|
"AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAA\
|
80
76
|
GAGTGTCTGATAGCAGC",
|
81
|
-
&[('A', 20), ('T', 21), ('C', 12), ('G', 17)]
|
77
|
+
&[('A', 20), ('T', 21), ('C', 12), ('G', 17)],
|
78
|
+
);
|
82
79
|
}
|
83
80
|
|
84
81
|
#[test]
|
@@ -91,11 +91,31 @@ Execute the tests with:
|
|
91
91
|
$ cargo test
|
92
92
|
```
|
93
93
|
|
94
|
-
All but the first test have been ignored.
|
95
|
-
pass,
|
96
|
-
|
97
|
-
|
98
|
-
|
94
|
+
All but the first test have been ignored. After you get the first test to
|
95
|
+
pass, open the tests source file wich is located in the `tests` directory
|
96
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
97
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
98
|
+
Continue, until you pass every test.
|
99
|
+
|
100
|
+
If you wish to run all tests without editing the tests source file, use:
|
101
|
+
|
102
|
+
```bash
|
103
|
+
$ cargo test -- --ignored
|
104
|
+
```
|
105
|
+
|
106
|
+
To run a specific test, for example `some_test`, you can use:
|
107
|
+
|
108
|
+
```bash
|
109
|
+
$ cargo test some_test
|
110
|
+
```
|
111
|
+
|
112
|
+
If the specfic test is ignored use:
|
113
|
+
|
114
|
+
```bash
|
115
|
+
$ cargo test some_test -- --ignored
|
116
|
+
```
|
117
|
+
|
118
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
99
119
|
|
100
120
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
101
121
|
haven't already, it will help you with organizing your files.
|
@@ -109,6 +129,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
109
129
|
[help-page]: http://exercism.io/languages/rust
|
110
130
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
111
131
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
132
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
112
133
|
|
113
134
|
## Source
|
114
135
|
|
@@ -45,11 +45,31 @@ Execute the tests with:
|
|
45
45
|
$ cargo test
|
46
46
|
```
|
47
47
|
|
48
|
-
All but the first test have been ignored.
|
49
|
-
pass,
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
All but the first test have been ignored. After you get the first test to
|
49
|
+
pass, open the tests source file wich is located in the `tests` directory
|
50
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
51
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
52
|
+
Continue, until you pass every test.
|
53
|
+
|
54
|
+
If you wish to run all tests without editing the tests source file, use:
|
55
|
+
|
56
|
+
```bash
|
57
|
+
$ cargo test -- --ignored
|
58
|
+
```
|
59
|
+
|
60
|
+
To run a specific test, for example `some_test`, you can use:
|
61
|
+
|
62
|
+
```bash
|
63
|
+
$ cargo test some_test
|
64
|
+
```
|
65
|
+
|
66
|
+
If the specfic test is ignored use:
|
67
|
+
|
68
|
+
```bash
|
69
|
+
$ cargo test some_test -- --ignored
|
70
|
+
```
|
71
|
+
|
72
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
53
73
|
|
54
74
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
55
75
|
haven't already, it will help you with organizing your files.
|
@@ -63,6 +83,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
63
83
|
[help-page]: http://exercism.io/languages/rust
|
64
84
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
65
85
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
86
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
66
87
|
|
67
88
|
## Source
|
68
89
|
|
@@ -21,11 +21,31 @@ Execute the tests with:
|
|
21
21
|
$ cargo test
|
22
22
|
```
|
23
23
|
|
24
|
-
All but the first test have been ignored.
|
25
|
-
pass,
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
All but the first test have been ignored. After you get the first test to
|
25
|
+
pass, open the tests source file wich is located in the `tests` directory
|
26
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
27
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
28
|
+
Continue, until you pass every test.
|
29
|
+
|
30
|
+
If you wish to run all tests without editing the tests source file, use:
|
31
|
+
|
32
|
+
```bash
|
33
|
+
$ cargo test -- --ignored
|
34
|
+
```
|
35
|
+
|
36
|
+
To run a specific test, for example `some_test`, you can use:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
$ cargo test some_test
|
40
|
+
```
|
41
|
+
|
42
|
+
If the specfic test is ignored use:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
$ cargo test some_test -- --ignored
|
46
|
+
```
|
47
|
+
|
48
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
29
49
|
|
30
50
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
31
51
|
haven't already, it will help you with organizing your files.
|
@@ -39,6 +59,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
39
59
|
[help-page]: http://exercism.io/languages/rust
|
40
60
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
41
61
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
62
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
42
63
|
|
43
64
|
## Source
|
44
65
|
|
@@ -54,11 +54,31 @@ Execute the tests with:
|
|
54
54
|
$ cargo test
|
55
55
|
```
|
56
56
|
|
57
|
-
All but the first test have been ignored.
|
58
|
-
pass,
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
All but the first test have been ignored. After you get the first test to
|
58
|
+
pass, open the tests source file wich is located in the `tests` directory
|
59
|
+
and remove the `#[ignore]` flag from the next test and get the tests to pass
|
60
|
+
again. Each separate test is a function with `#[test]` flag above it.
|
61
|
+
Continue, until you pass every test.
|
62
|
+
|
63
|
+
If you wish to run all tests without editing the tests source file, use:
|
64
|
+
|
65
|
+
```bash
|
66
|
+
$ cargo test -- --ignored
|
67
|
+
```
|
68
|
+
|
69
|
+
To run a specific test, for example `some_test`, you can use:
|
70
|
+
|
71
|
+
```bash
|
72
|
+
$ cargo test some_test
|
73
|
+
```
|
74
|
+
|
75
|
+
If the specfic test is ignored use:
|
76
|
+
|
77
|
+
```bash
|
78
|
+
$ cargo test some_test -- --ignored
|
79
|
+
```
|
80
|
+
|
81
|
+
To learn more about Rust tests refer to the [online test documentation][rust-tests]
|
62
82
|
|
63
83
|
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
|
64
84
|
haven't already, it will help you with organizing your files.
|
@@ -72,6 +92,7 @@ If you want to know more about Exercism, take a look at the [contribution guide]
|
|
72
92
|
[help-page]: http://exercism.io/languages/rust
|
73
93
|
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
|
74
94
|
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
|
95
|
+
[rust-tests]: https://doc.rust-lang.org/book/second-edition/ch11-02-running-tests.html
|
75
96
|
|
76
97
|
## Submitting Incomplete Solutions
|
77
98
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|