Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer Edit: UnitTest #8

Open
h0n9 opened this issue Jun 20, 2018 · 0 comments
Open

Peer Edit: UnitTest #8

h0n9 opened this issue Jun 20, 2018 · 0 comments

Comments

@h0n9
Copy link
Contributor

h0n9 commented Jun 20, 2018

Actually, while seeing UnitTestBST, I found some code which has a potential to derive same results from two different tests, resulting in wrong Unit Test.

Please, check the following code.

/* 정렬하는 데 걸리는 시간 */
TEST_METHOD(BST_Insert_Desc) // 내림차순 입력
{
	IntSetBST test(max_e, max_v);
	int j = 0;
	for (int i = max_e - 1; i >= 0; i--) {
		test.insert(max_v - j);
		j++;
	}
}
TEST_METHOD(BST_Insert_Asce) // 오름차순 입력
{
	IntSetBST test(max_e, max_v);
	int j = 0;
	for (int i = max_e - 1; i >= 0; i--) {
		test.insert(max_v - j);
		j++;
	}
}

Those two functions do insertion of values in descending order

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant