Skip to content

Commit ee2a4c1

Browse files
kmykkyuridenamida
authored andcommitted
kyuridenamida#126 Remove version strings from test resources (kyuridenamida#130)
* kyuridenamida#126 Remove version strigns from test resources * Apply autopep8
1 parent 53d3fe8 commit ee2a4c1

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

tests/resources/test_codegen/test_default_code_generators_and_templates/cpp/expected_default_generated_code.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void solve(long long N, long long M, std::vector<std::vector<std::string>> H, st
99

1010
}
1111

12-
// Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
12+
// Generated by x.y.z https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
1313
int main(){
1414
long long N;
1515
scanf("%lld",&N);

tests/resources/test_codegen/test_default_code_generators_and_templates/java/expected_default_generated_code.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Main {
66
static final String YES = "yes";
77
static final String NO = "NO";
88

9-
// Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
9+
// Generated by x.y.z https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
1010
public static void main(String[] args) throws Exception {
1111
final Scanner sc = new Scanner(System.in);
1212
long N;

tests/resources/test_codegen/test_default_code_generators_and_templates/python/expected_default_generated_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def solve(N: int, M: int, H: "List[List[str]]", A: "List[int]", B: "List[float]"
99
return
1010

1111

12-
# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
12+
# Generated by x.y.z https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
1313
def main():
1414
def iterate_tokens():
1515
for line in sys.stdin:

tests/resources/test_codegen/test_default_code_generators_and_templates/rust/expected_default_generated_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn solve(N: i64, M: i64, H: Vec<Vec<String>>, A: Vec<i64>, B: Vec<f64>, Q: i64,
88

99
}
1010

11-
// Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
11+
// Generated by x.y.z https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
1212
fn main() {
1313
let con = read_string();
1414
let mut scanner = Scanner::new(&con);

tests/test_codegen.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import re
23
import sys
34
import tempfile
45
import unittest
@@ -196,6 +197,8 @@ def _compile_and_run(self, lang, format, template_file, expected_generated_code_
196197
)
197198

198199
code = lang.default_code_generator(args)
200+
# to remove version strings from test resources
201+
code = re.sub(r'Generated by \d+.\d+.\d+', 'Generated by x.y.z', code)
199202
self.compare_two_texts_ignoring_trailing_spaces(
200203
load_text_file(expected_generated_code_file), code)
201204
create_code(code, code_file)

0 commit comments

Comments
 (0)