Skip to content

Commit a66d2d3

Browse files
authored
Merge pull request #35 from devchat-ai/user-input-cases
Accept user input for test cases
2 parents d0020e8 + 00f0fa1 commit a66d2d3

5 files changed

Lines changed: 255 additions & 115 deletions

File tree

unit_tests/locales/base.pot

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-01-11 21:35+0800\n"
11+
"POT-Creation-Date: 2024-01-18 15:29+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,44 +17,65 @@ msgstr ""
1717
"Content-Type: text/plain; charset=CHARSET\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#: main.py:30
20+
#: main.py:53
2121
msgid "Analyzing the function and current unit tests..."
2222
msgstr ""
2323

24-
#: main.py:49
24+
#: main.py:84
2525
msgid "Select test cases to generate"
2626
msgstr ""
2727

28-
#: main.py:54
28+
#: main.py:89
29+
msgid ""
30+
"You can add more test cases here\n"
31+
"(Multiple cases can be separated by line breaks)"
32+
msgstr ""
33+
34+
#: main.py:95
2935
msgid ""
3036
"Edit reference test file\n"
3137
"(Multiple files can be separated by line breaks)"
3238
msgstr ""
3339

34-
#: main.py:68
40+
#: main.py:112
3541
msgid "No test case is selected. Quit generating tests."
3642
msgstr ""
3743

38-
#: main.py:90
39-
msgid "No valid file is provided. Will not use reference to generate tests."
44+
#: main.py:129
45+
msgid "Will generate tests for the following cases."
46+
msgstr ""
47+
48+
#: main.py:132
49+
msgid ""
50+
"\n"
51+
"Test cases:"
4052
msgstr ""
4153

42-
#: main.py:93
43-
msgid "Will use the following reference files to generate tests:"
54+
#: main.py:139
55+
msgid ""
56+
"\n"
57+
"No valid reference file is provided. Will not use reference to generate "
58+
"tests."
59+
msgstr ""
60+
61+
#: main.py:144
62+
msgid ""
63+
"\n"
64+
"Will use the following reference files to generate tests."
4465
msgstr ""
4566

46-
#: main.py:94
67+
#: main.py:145
4768
msgid ""
4869
"\n"
4970
"Valid reference files:"
5071
msgstr ""
5172

52-
#: main.py:98
73+
#: main.py:150
5374
msgid ""
5475
"\n"
5576
"Invalid files:"
5677
msgstr ""
5778

58-
#: main.py:169
79+
#: main.py:232
5980
msgid "The function's size surpasses AI's context capacity."
6081
msgstr ""

unit_tests/locales/en/base.po

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-01-11 21:35+0800\n"
10+
"POT-Creation-Date: 2024-01-18 15:29+0800\n"
1111
"PO-Revision-Date: 2023-12-24 16:51+0800\n"
1212
"Last-Translator: kagami <mingjing@merico.dev>\n"
1313
"Language-Team: English\n"
@@ -17,45 +17,66 @@ msgstr ""
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1919

20-
#: main.py:30
20+
#: main.py:53
2121
msgid "Analyzing the function and current unit tests..."
2222
msgstr ""
2323

24-
#: main.py:49
24+
#: main.py:84
2525
msgid "Select test cases to generate"
2626
msgstr ""
2727

28-
#: main.py:54
28+
#: main.py:89
29+
msgid ""
30+
"You can add more test cases here\n"
31+
"(Multiple cases can be separated by line breaks)"
32+
msgstr ""
33+
34+
#: main.py:95
2935
msgid ""
3036
"Edit reference test file\n"
3137
"(Multiple files can be separated by line breaks)"
3238
msgstr ""
3339

34-
#: main.py:68
40+
#: main.py:112
3541
msgid "No test case is selected. Quit generating tests."
3642
msgstr ""
3743

38-
#: main.py:90
39-
msgid "No valid file is provided. Will not use reference to generate tests."
44+
#: main.py:129
45+
msgid "Will generate tests for the following cases."
46+
msgstr ""
47+
48+
#: main.py:132
49+
msgid ""
50+
"\n"
51+
"Test cases:"
4052
msgstr ""
4153

42-
#: main.py:93
43-
msgid "Will use the following reference files to generate tests:"
54+
#: main.py:139
55+
msgid ""
56+
"\n"
57+
"No valid reference file is provided. Will not use reference to generate "
58+
"tests."
59+
msgstr ""
60+
61+
#: main.py:144
62+
msgid ""
63+
"\n"
64+
"Will use the following reference files to generate tests."
4465
msgstr ""
4566

46-
#: main.py:94
67+
#: main.py:145
4768
msgid ""
4869
"\n"
4970
"Valid reference files:"
5071
msgstr ""
5172

52-
#: main.py:98
73+
#: main.py:150
5374
msgid ""
5475
"\n"
5576
"Invalid files:"
5677
msgstr ""
5778

58-
#: main.py:169
79+
#: main.py:232
5980
msgid "The function's size surpasses AI's context capacity."
6081
msgstr ""
6182

352 Bytes
Binary file not shown.

unit_tests/locales/zh/base.po

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-01-11 21:35+0800\n"
10+
"POT-Creation-Date: 2024-01-18 15:29+0800\n"
1111
"PO-Revision-Date: 2023-12-24 16:51+0800\n"
1212
"Last-Translator: kagami <mingjing@merico.dev>\n"
1313
"Language-Team: Chinese\n"
@@ -16,51 +16,74 @@ msgstr ""
1616
"Content-Type: text/plain; charset=UTF-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
1818

19-
#: main.py:30
19+
#: main.py:53
2020
msgid "Analyzing the function and current unit tests..."
2121
msgstr "正在分析目标函数和项目中现有的单元测试……"
2222

23-
#: main.py:49
23+
#: main.py:84
2424
msgid "Select test cases to generate"
2525
msgstr "选择测试用例以生成单元测试"
2626

27-
#: main.py:54
27+
#: main.py:89
28+
msgid ""
29+
"You can add more test cases here\n"
30+
"(Multiple cases can be separated by line breaks)"
31+
msgstr ""
32+
"可在输入框中添加更多测试用例\n"
33+
"(多个测试用例用换行分隔)"
34+
35+
#: main.py:95
2836
msgid ""
2937
"Edit reference test file\n"
3038
"(Multiple files can be separated by line breaks)"
3139
msgstr ""
3240
"参考的测试文件\n"
3341
"(多个文件路径用换行分隔)"
3442

35-
#: main.py:68
43+
#: main.py:112
3644
msgid "No test case is selected. Quit generating tests."
3745
msgstr "未选择测试用例,退出生成单元测试。"
3846

39-
#: main.py:90
40-
msgid "No valid file is provided. Will not use reference to generate tests."
41-
msgstr "没有提供合法的文件,生成单元测试时将不使用参考。"
47+
#: main.py:129
48+
msgid "Will generate tests for the following cases."
49+
msgstr "将为以下用例生成测试。"
50+
51+
#: main.py:132
52+
msgid ""
53+
"\n"
54+
"Test cases:"
55+
msgstr "\n测试用例:"
4256

43-
#: main.py:93
44-
msgid "Will use the following reference files to generate tests:"
45-
msgstr "将参考以下文件生成单元测试:"
57+
#: main.py:139
58+
msgid ""
59+
"\n"
60+
"No valid reference file is provided. Will not use reference to generate "
61+
"tests."
62+
msgstr "\n没有提供合法的文件,生成单元测试时将不使用参考。"
63+
64+
#: main.py:144
65+
msgid ""
66+
"\n"
67+
"Will use the following reference files to generate tests."
68+
msgstr "\n将参考以下文件生成单元测试。"
4669

47-
#: main.py:94
70+
#: main.py:145
4871
msgid ""
4972
"\n"
5073
"Valid reference files:"
5174
msgstr ""
5275
"\n"
5376
"参考文件:"
5477

55-
#: main.py:98
78+
#: main.py:150
5679
msgid ""
5780
"\n"
5881
"Invalid files:"
5982
msgstr ""
6083
"\n"
6184
"不合法的文件:"
6285

63-
#: main.py:169
86+
#: main.py:232
6487
msgid "The function's size surpasses AI's context capacity."
6588
msgstr "由于当前函数过大,AI暂时无法处理。"
6689

0 commit comments

Comments
 (0)