Sha256: 2ccff9c4f5fe980814b6e80cbbe37239d2cf20c3b62e286476cde70e29b89a51

Contents?: true

Size: 1.42 KB

Versions: 44

Compression:

Stored size: 1.42 KB

Contents

extern crate rna_transcription as dna;

#[test]
fn test_acid_equals_acid() {
    assert_eq!(dna::RibonucleicAcid::new("CGA"), dna::RibonucleicAcid::new("CGA"));
    assert!(dna::RibonucleicAcid::new("CGA") != dna::RibonucleicAcid::new("AGC"));
}

#[test]
#[ignore]
fn test_transcribes_cytosine_guanine() {
    assert_eq!(Ok(dna::RibonucleicAcid::new("G")), dna::DeoxyribonucleicAcid::new("C").to_rna());
}

#[test]
#[ignore]
fn test_transcribes_guanine_cytosine() {
    assert_eq!(Ok(dna::RibonucleicAcid::new("C")), dna::DeoxyribonucleicAcid::new("G").to_rna());
}

#[test]
#[ignore]
fn test_transcribes_adenine_uracil() {
    assert_eq!(Ok(dna::RibonucleicAcid::new("U")), dna::DeoxyribonucleicAcid::new("A").to_rna());
}

#[test]
#[ignore]
fn test_transcribes_thymine_to_adenine() {
    assert_eq!(Ok(dna::RibonucleicAcid::new("A")), dna::DeoxyribonucleicAcid::new("T").to_rna());
}

#[test]
#[ignore]
fn test_transcribes_all_dna_to_rna() {
    assert_eq!(Ok(dna::RibonucleicAcid::new("UGCACCAGAAUU")), dna::DeoxyribonucleicAcid::new("ACGTGGTCTTAA").to_rna())
}

#[test]
#[ignore]
fn handles_invalid_input() {
    assert!(dna::DeoxyribonucleicAcid::new("U").to_rna().is_err());
}

#[test]
#[ignore]
fn handles_completely_invalid_input() {
    assert!(dna::DeoxyribonucleicAcid::new("XXX").to_rna().is_err());
}

#[test]
#[ignore]
fn handles_partially_invalid_input() {
    assert!(dna::DeoxyribonucleicAcid::new("ACGTXXXCTTAA").to_rna().is_err());
}

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
trackler-2.2.1.6 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.5 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.4 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.3 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.2 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.1 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.1.0 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.6 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.5 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.4 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.3 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.2 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.1 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.2.0.0 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.55 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.54 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.53 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.52 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.51 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs
trackler-2.1.0.50 tracks/rust/exercises/rna-transcription/tests/rna-transcription.rs