Add test for defined and reset and Complement tests#9
Add test for defined and reset and Complement tests#9youge325 wants to merge 9 commits intoPFCCLab:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds test coverage for two tensor lifecycle methods: defined() and reset(). These tests verify that tensors can be checked for initialization state and can be properly reset to an undefined state.
- Adds
Definedtest to verify that a properly initialized tensor returns true fordefined() - Adds
Resettest to verify that callingreset()makes a tensor undefined
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/TensorTest.cpp
Outdated
|
|
||
| // 测试 defined | ||
| TEST_F(TensorTest, Defined) { | ||
| // Tensor tensor(paddle_tensor_); |
There was a problem hiding this comment.
This commented-out code should be removed. The tensor object is already initialized in the test fixture's SetUp() method and is available to all test cases. This commented line appears to be leftover from development and is consistent with similar commented lines in other tests in this file that should also be cleaned up.
test/TensorTest.cpp
Outdated
|
|
||
| // 测试 reset | ||
| TEST_F(TensorTest, Reset) { | ||
| // Tensor tensor(paddle_tensor_); |
There was a problem hiding this comment.
This commented-out code should be removed. The tensor object is already initialized in the test fixture's SetUp() method and is available to all test cases. This commented line appears to be leftover from development and is consistent with similar commented lines in other tests in this file that should also be cleaned up.
|
测试冲突了,解一下冲突,并根据合入的claude skill检查一下测试的全面性 |
好的 |
6e1b29a to
c1e1587
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2fd8276 to
86451a6
Compare
新增

reset和defined测试并根据skill添加测试Paddle中SymInt是int64_t的别名,libtorch中SymInt是一个类,是否需要对齐一下SymInt,还是说以后的测试用例分别编译,只要输出相同就行