Skip to content

Commit

Permalink
Improve:
Browse files Browse the repository at this point in the history
- Move test to tests mod
- rustfmt'd code
  • Loading branch information
Jay9596 committed Mar 1, 2019
1 parent e8b373b commit 8e374a9
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ fn complement_dna(dna: &str) -> String {
'C' => 'G',
'G' => 'C',
_ => ' ',
}).collect()
})
.collect()
}

#[test]
fn sample_test() {
assert_eq!(complement_dna("AAAACCCGGT"), "ACCGGGTTTT");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn sample_test() {
assert_eq!(complement_dna("AAAACCCGGT"), "ACCGGGTTTT");
}
}

0 comments on commit 8e374a9

Please sign in to comment.