diff --git a/bin/checkout_pinned_problem_specifications_commit.sh b/bin/checkout_pinned_problem_specifications_commit.sh index b98e4c3b252..85ae8713391 100755 --- a/bin/checkout_pinned_problem_specifications_commit.sh +++ b/bin/checkout_pinned_problem_specifications_commit.sh @@ -3,7 +3,7 @@ set -euo pipefail cd "$(git rev-parse --show-toplevel)" -PINNED_COMMIT_HASH="c4043d661357fc2d7ad07b8359adc92d283a5a00" +PINNED_COMMIT_HASH="9a6acd6f7f462089181251560eebb22eba893272" dir="$(./bin/get_problem_specifications_dir.sh)" diff --git a/exercises/practice/variable-length-quantity/.meta/tests.toml b/exercises/practice/variable-length-quantity/.meta/tests.toml index c9af549fc6f..53be789a382 100644 --- a/exercises/practice/variable-length-quantity/.meta/tests.toml +++ b/exercises/practice/variable-length-quantity/.meta/tests.toml @@ -15,6 +15,9 @@ description = "Encode a series of integers, producing a series of bytes. -> zero [be44d299-a151-4604-a10e-d4b867f41540] description = "Encode a series of integers, producing a series of bytes. -> arbitrary single byte" +[890bc344-cb80-45af-b316-6806a6971e81] +description = "Encode a series of integers, producing a series of bytes. -> asymmetric single byte" + [ea399615-d274-4af6-bbef-a1c23c9e1346] description = "Encode a series of integers, producing a series of bytes. -> largest single byte" @@ -24,6 +27,9 @@ description = "Encode a series of integers, producing a series of bytes. -> smal [63955a49-2690-4e22-a556-0040648d6b2d] description = "Encode a series of integers, producing a series of bytes. -> arbitrary double byte" +[4977d113-251b-4d10-a3ad-2f5a7756bb58] +description = "Encode a series of integers, producing a series of bytes. -> asymmetric double byte" + [29da7031-0067-43d3-83a7-4f14b29ed97a] description = "Encode a series of integers, producing a series of bytes. -> largest double byte" @@ -33,6 +39,9 @@ description = "Encode a series of integers, producing a series of bytes. -> smal [5df0bc2d-2a57-4300-a653-a75ee4bd0bee] description = "Encode a series of integers, producing a series of bytes. -> arbitrary triple byte" +[6731045f-1e00-4192-b5ae-98b22e17e9f7] +description = "Encode a series of integers, producing a series of bytes. -> asymmetric triple byte" + [f51d8539-312d-4db1-945c-250222c6aa22] description = "Encode a series of integers, producing a series of bytes. -> largest triple byte" @@ -42,6 +51,9 @@ description = "Encode a series of integers, producing a series of bytes. -> smal [11ed3469-a933-46f1-996f-2231e05d7bb6] description = "Encode a series of integers, producing a series of bytes. -> arbitrary quadruple byte" +[b45ef770-cbba-48c2-bd3c-c6362679516e] +description = "Encode a series of integers, producing a series of bytes. -> asymmetric quadruple byte" + [d5f3f3c3-e0f1-4e7f-aad0-18a44f223d1c] description = "Encode a series of integers, producing a series of bytes. -> largest quadruple byte" @@ -51,6 +63,9 @@ description = "Encode a series of integers, producing a series of bytes. -> smal [5f34ff12-2952-4669-95fe-2d11b693d331] description = "Encode a series of integers, producing a series of bytes. -> arbitrary quintuple byte" +[9be46731-7cd5-415c-b960-48061cbc1154] +description = "Encode a series of integers, producing a series of bytes. -> asymmetric quintuple byte" + [7489694b-88c3-4078-9864-6fe802411009] description = "Encode a series of integers, producing a series of bytes. -> maximum 32-bit integer input" diff --git a/exercises/practice/variable-length-quantity/tests/variable_length_quantity.rs b/exercises/practice/variable-length-quantity/tests/variable_length_quantity.rs index e3f3dfe5ff4..b1b4e762d2c 100644 --- a/exercises/practice/variable-length-quantity/tests/variable_length_quantity.rs +++ b/exercises/practice/variable-length-quantity/tests/variable_length_quantity.rs @@ -17,6 +17,15 @@ fn arbitrary_single_byte() { assert_eq!(output, expected); } +#[test] +#[ignore] +fn asymmetric_single_byte() { + let input = &[83]; + let output = vlq::to_bytes(input); + let expected = vec![0x53]; + assert_eq!(output, expected); +} + #[test] #[ignore] fn largest_single_byte() { @@ -44,6 +53,15 @@ fn arbitrary_double_byte() { assert_eq!(output, expected); } +#[test] +#[ignore] +fn asymmetric_double_byte() { + let input = &[173]; + let output = vlq::to_bytes(input); + let expected = vec![0x81, 0x2d]; + assert_eq!(output, expected); +} + #[test] #[ignore] fn largest_double_byte() { @@ -71,6 +89,15 @@ fn arbitrary_triple_byte() { assert_eq!(output, expected); } +#[test] +#[ignore] +fn asymmetric_triple_byte() { + let input = &[120_220]; + let output = vlq::to_bytes(input); + let expected = vec![0x87, 0xab, 0x1c]; + assert_eq!(output, expected); +} + #[test] #[ignore] fn largest_triple_byte() { @@ -98,6 +125,15 @@ fn arbitrary_quadruple_byte() { assert_eq!(output, expected); } +#[test] +#[ignore] +fn asymmetric_quadruple_byte() { + let input = &[3_503_876]; + let output = vlq::to_bytes(input); + let expected = vec![0x81, 0xd5, 0xee, 0x4]; + assert_eq!(output, expected); +} + #[test] #[ignore] fn largest_quadruple_byte() { @@ -125,6 +161,15 @@ fn arbitrary_quintuple_byte() { assert_eq!(output, expected); } +#[test] +#[ignore] +fn asymmetric_quintuple_byte() { + let input = &[2_254_790_917]; + let output = vlq::to_bytes(input); + let expected = vec![0x88, 0xb3, 0x95, 0xc2, 0x5]; + assert_eq!(output, expected); +} + #[test] #[ignore] fn maximum_32_bit_integer_input() {