vscode-debug-leetcode icon indicating copy to clipboard operation
vscode-debug-leetcode copied to clipboard

在测试样例包含方法调用的C++题目中报错:Input parameters is not match the problem!

Open lgx98 opened this issue 4 years ago • 1 comments

在146 155 352 355 380 381 382 460 528 641 705 706 707 710 715 981等题中(不完全统计),使用C++语言,点击Debug后出现报错:Input parameters is not match the problem! 报错可以追溯到这一行: https://github.com/wangtao0101/vscode-debug-leetcode/blob/bbdbb9aaa106a6a74311a83910e7ac3b13453ced/src/debug/executor/cppExecutor.ts#L103

原因是problemType.ts中,对方法调用这类测试样例输入在paramTypes中没有写出对应的类型,而从testCase中利用\n分割出的params中包含了方法调用的测试输入,导致cppExecutor.ts中params.length==paramsType.length+1。

另外,报错信息存在英文语法错误,可以改为:

The input parameters do not match the problem!

lgx98 avatar Aug 19 '21 21:08 lgx98

@lgx98 感谢回复,哈哈,很多题目不能用统一的方式debug,必须单独写,本人偷懒没有实现。😭

wangtao0101 avatar Aug 20 '21 03:08 wangtao0101