Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync problem-specifications tests #330

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions exercises/practice/bob/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ description = "alternate silence"

[66953780-165b-4e7e-8ce3-4bcb80b6385a]
description = "multiple line question"
include = false

[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
description = "starting with whitespace"
Expand All @@ -83,3 +84,7 @@ description = "other whitespace"

[12983553-8601-46a8-92fa-fcaa3bc4a2a0]
description = "non-question ending with whitespace"

[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
description = "multiple line question"
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"
9 changes: 5 additions & 4 deletions exercises/practice/bob/bob.vader
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ Execute (alternate silence):
let g:expected = "Fine. Be that way!"
AssertEqual g:expected, Response(g:heyBob)

Execute (multiple line question):
let g:heyBob = "\nDoes this cryogenic chamber make me look fat?\nNo."
let g:expected = "Whatever."
AssertEqual g:expected, Response(g:heyBob)

Execute (starting with whitespace):
let g:heyBob = " hmmmmmmm..."
Expand All @@ -123,3 +119,8 @@ Execute (non-question ending with whitespace):
let g:heyBob = "This is a statement ending with whitespace "
let g:expected = "Whatever."
AssertEqual g:expected, Response(g:heyBob)

Execute (multiple line question):
let g:heyBob = "\nDoes this cryogenic chamber make\n me look fat?"
let g:expected = "Sure."
AssertEqual g:expected, Response(g:heyBob)
3 changes: 3 additions & 0 deletions exercises/practice/pig-latin/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ description = "first letter and ay are moved to the end of words that start with
[bce94a7a-a94e-4e2b-80f4-b2bb02e40f71]
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with q without a following u"

[e59dbbe8-ccee-4619-a8e9-ce017489bfc0]
description = "first letter and ay are moved to the end of words that start with consonants -> word beginning with consonant and vowel containing qu"

[c01e049a-e3e2-451c-bf8e-e2abb7e438b8]
description = "some letter clusters are treated like a single consonant -> word beginning with ch"

Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/pig-latin/pig_latin.vader
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Execute (word beginning with a):
let g:phrase = "apple"
let g:expected = "appleay"
Expand Down Expand Up @@ -27,7 +28,6 @@ Execute (word beginning with a vowel and followed by a qu):
let g:phrase = "equal"
let g:expected = "equalay"
AssertEqual g:expected, Translate(g:phrase)

Execute (word beginning with p):
let g:phrase = "pig"
let g:expected = "igpay"
Expand All @@ -47,6 +47,11 @@ Execute (word beginning with q without a following u):
let g:phrase = "qat"
let g:expected = "atqay"
AssertEqual g:expected, Translate(g:phrase)

Execute (word beginning with consonant and vowel containing qu):
let g:phrase = "liquid"
let g:expected = "iquidlay"
AssertEqual g:expected, Translate(g:phrase)
Execute (word beginning with ch):
let g:phrase = "chair"
let g:expected = "airchay"
Expand Down
4 changes: 4 additions & 0 deletions exercises/practice/protein-translation/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
description = "Translation stops if STOP codon in middle of six-codon sequence"

[f6f92714-769f-4187-9524-e353e8a41a80]
description = "Sequence of two non-STOP codons does not translate to a STOP codon"

[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
description = "Non-existing codon can't translate"

[9eac93f3-627a-4c90-8653-6d0a0595bc6f]
description = "Unknown amino acids, not part of a codon, can't translate"
reimplements = "1e75ea2a-f907-4994-ae5c-118632a1cb0f"

[9d73899f-e68e-4291-b1e2-7bf87c00f024]
description = "Incomplete RNA sequence can't translate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ Execute (Translation stops if STOP codon in middle of six-codon sequence):
let g:expected = ['Tryptophan', 'Cysteine', 'Tyrosine']
AssertEqual g:expected, Proteins(g:strand)

Execute (Sequence of two non-STOP codons does not translate to a STOP codon):
let g:strand = "AUGAUG"
let g:expected = ['Methionine', 'Methionine']
AssertEqual g:expected, Proteins(g:strand)

Execute (Non-existing codon can't translate):
let g:strand = "AAA"
let g:expected = "Invalid codon"
Expand Down