Put str tests in a nested tests module
This commit is contained in:
parent
104b9b0864
commit
4a0586b1a5
1 changed files with 35 additions and 30 deletions
|
@ -62,6 +62,10 @@ impl CharAt for str {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn index_before_is_well_behaved_for_ascii() {
|
fn index_before_is_well_behaved_for_ascii() {
|
||||||
let s = "abc";
|
let s = "abc";
|
||||||
|
@ -96,3 +100,4 @@ fn index_after_is_well_behaved_for_ascii() {
|
||||||
assert!(s.is_char_boundary(idx));
|
assert!(s.is_char_boundary(idx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue