-
-
Save tanriol/e5239b88963164e59e62a54f49f1921e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::env; | |
#[test] | |
fn test_lots_lots_of_rectangles() { | |
let size: usize = env::var("SIZE").unwrap_or("10".to_string()).parse().unwrap(); | |
let line: String = vec!["+"; size].into_iter().collect(); | |
let lines: Vec<&str> = vec![&line; size]; | |
assert_eq!(count(&lines), (size * (size - 1) / 2).pow(2)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment