项目测试代码结构调整
This commit is contained in:
		@@ -3,8 +3,8 @@ import * as assert from 'assert';
 | 
				
			|||||||
// You can import and use all API from the 'vscode' module
 | 
					// You can import and use all API from the 'vscode' module
 | 
				
			||||||
// as well as import your extension to test it
 | 
					// as well as import your extension to test it
 | 
				
			||||||
import * as vscode from 'vscode';
 | 
					import * as vscode from 'vscode';
 | 
				
			||||||
import testGroups from './test-case';
 | 
					import { pathConvertTestGroups } from './test-case/path-convert-test-case';
 | 
				
			||||||
import { TestCase, TestCaseGroup } from './types/TestCaseType';
 | 
					import { TestCase, TestCaseGroup } from './test-case/types/TestCaseType';
 | 
				
			||||||
import { transformMutliLineText, transformText } from '../utils/transform';
 | 
					import { transformMutliLineText, transformText } from '../utils/transform';
 | 
				
			||||||
import { caseConversion } from '../core/variable-convert/conversion';
 | 
					import { caseConversion } from '../core/variable-convert/conversion';
 | 
				
			||||||
import { SupportCase } from '../core/variable-convert/types/SupportCaseType';
 | 
					import { SupportCase } from '../core/variable-convert/types/SupportCaseType';
 | 
				
			||||||
@@ -22,10 +22,15 @@ suite('Extension Test Suite', () => {
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
suite('Extension Test: run test case', () => {
 | 
					/**
 | 
				
			||||||
 | 
					 * 变量转换 测试函数
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @since 2024-04-02
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					suite('Extension Test: run variable convert test case', () => {
 | 
				
			||||||
	vscode.window.showInformationMessage('Start all tests.');
 | 
						vscode.window.showInformationMessage('Start all tests.');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const groups: Array<TestCaseGroup> = testGroups;
 | 
						const groups: Array<TestCaseGroup> = pathConvertTestGroups;
 | 
				
			||||||
	for (const testGroup of groups) {
 | 
						for (const testGroup of groups) {
 | 
				
			||||||
		const testTitle = testGroup.testTitle;
 | 
							const testTitle = testGroup.testTitle;
 | 
				
			||||||
		const testCases: Array<TestCase> = testGroup.cases;
 | 
							const testCases: Array<TestCase> = testGroup.cases;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ import { TestCaseGroup } from "./types/TestCaseType";
 | 
				
			|||||||
const LF = '\n';
 | 
					const LF = '\n';
 | 
				
			||||||
const CRLF = '\r\n';
 | 
					const CRLF = '\r\n';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const testGroups: Array<TestCaseGroup> = [
 | 
					export const pathConvertTestGroups: Array<TestCaseGroup> = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        group: 'Input validation',
 | 
					        group: 'Input validation',
 | 
				
			||||||
        testTitle: 'Input validation (输入有效性验证)',
 | 
					        testTitle: 'Input validation (输入有效性验证)',
 | 
				
			||||||
@@ -1095,5 +1095,3 @@ const testGroups: Array<TestCaseGroup> = [
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // add more cases...
 | 
					    // add more cases...
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					 | 
				
			||||||
export default testGroups;
 | 
					 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { EOL } from "../../types/EOLType";
 | 
					import { EOL } from "../../../types/EOLType";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type TestCaseGroup = {
 | 
					export type TestCaseGroup = {
 | 
				
			||||||
    group: string
 | 
					    group: string
 | 
				
			||||||
		Reference in New Issue
	
	Block a user