Skip to content

Add test for defined and reset and Complement tests#9

Open
youge325 wants to merge 9 commits intoPFCCLab:masterfrom
youge325:cReset
Open

Add test for defined and reset and Complement tests#9
youge325 wants to merge 9 commits intoPFCCLab:masterfrom
youge325:cReset

Conversation

@youge325
Copy link
Contributor

@youge325 youge325 commented Dec 28, 2025

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

Copilot AI review requested due to automatic review settings December 28, 2025 05:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Defined test to verify that a properly initialized tensor returns true for defined()
  • Adds Reset test to verify that calling reset() makes a tensor undefined

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// 测试 defined
TEST_F(TensorTest, Defined) {
// Tensor tensor(paddle_tensor_);
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

// 测试 reset
TEST_F(TensorTest, Reset) {
// Tensor tensor(paddle_tensor_);
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@BingooYang
Copy link
Contributor

测试冲突了,解一下冲突,并根据合入的claude skill检查一下测试的全面性

@youge325
Copy link
Contributor Author

youge325 commented Mar 1, 2026

测试冲突了,解一下冲突,并根据合入的claude skill检查一下测试的全面性

好的

@youge325 youge325 force-pushed the cReset branch 2 times, most recently from 6e1b29a to c1e1587 Compare March 2, 2026 04:50
@youge325 youge325 changed the title add test for defined and reset methods in TensorTest add test for defined and reset and complement tests Mar 2, 2026
@youge325 youge325 changed the title add test for defined and reset and complement tests Add test for defined and reset and Complement tests Mar 2, 2026
@youge325 youge325 force-pushed the cReset branch 2 times, most recently from 2fd8276 to 86451a6 Compare March 6, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants