Skip to content

Commit e4a14e1

Browse files
Merge branch 'master' of https://github.com/polyester-CTRL/AtCoderProblems into feature/993
2 parents 8b286cc + e62435a commit e4a14e1

File tree

42 files changed

+761
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+761
-235
lines changed

atcoder-problems-backend/atcoder-client/src/atcoder/problem.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,35 @@ mod tests {
8989
]
9090
);
9191
}
92+
93+
#[test]
94+
fn test_scrape_atc002() {
95+
let mut file = File::open("test_resources/atc002_tasks").unwrap();
96+
let mut contents = String::new();
97+
file.read_to_string(&mut contents).unwrap();
98+
let problems = scrape(&contents, "atc002").unwrap();
99+
assert_eq!(
100+
problems,
101+
vec![
102+
AtCoderProblem {
103+
id: "abc007_3".to_owned(),
104+
contest_id: "atc002".to_owned(),
105+
title: "幅優先探索".to_owned(),
106+
position: "A".to_owned(),
107+
},
108+
AtCoderProblem {
109+
id: "atc002_b".to_owned(),
110+
contest_id: "atc002".to_owned(),
111+
title: "n^p mod m".to_owned(),
112+
position: "B".to_owned(),
113+
},
114+
AtCoderProblem {
115+
id: "atc002_c".to_owned(),
116+
contest_id: "atc002".to_owned(),
117+
title: "最適二分探索木".to_owned(),
118+
position: "C".to_owned(),
119+
},
120+
]
121+
)
122+
}
92123
}

0 commit comments

Comments
 (0)