Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(25)

Issue 163081: Unit tests

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 6 months ago by sleeepycat
Modified:
16 years, 5 months ago
Reviewers:
Timur Iskhodzhanov
Base URL:
http://vectorr.googlecode.com/svn/trunk/
Visibility:
Public.

Description

I couldn't help myself making one more issue) Here are just an empty several sections. Can I use this structure for my unit-tests?

Patch Set 1 #

Total comments: 10

Patch Set 2 : TextFixture class removed and two asserts added #

Patch Set 3 : Big patch with unit-tests for int #

Total comments: 21

Patch Set 4 : Tests changed to better obey the contracts #

Total comments: 11

Patch Set 5 : Response to previous comments & Great renaming #

Total comments: 8

Patch Set 6 : Modified PushBack test #

Total comments: 8

Patch Set 7 : Response to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -4 lines) Patch
M Main.cpp View 3 4 5 6 1 chunk +30 lines, -4 lines 0 comments Download

Messages

Total messages: 24
sleeepycat
I couldn't help myself making one more issue) Here are just an empty several sections. ...
16 years, 6 months ago (2009-12-02 13:11:09 UTC) #1
Timur Iskhodzhanov
Please don't include .suo file in changelists http://codereview.appspot.com/163081/diff/1/3 File mystl/Vector.h (right): http://codereview.appspot.com/163081/diff/1/3#newcode21 mystl/Vector.h:21: size_ = ...
16 years, 6 months ago (2009-12-02 15:27:33 UTC) #2
sleeepycat
http://codereview.appspot.com/163081/diff/1/3 File mystl/Vector.h (right): http://codereview.appspot.com/163081/diff/1/3#newcode64 mystl/Vector.h:64: }; On 2009/12/02 15:27:33, Timur Iskhodzhanov wrote: > You ...
16 years, 6 months ago (2009-12-04 10:11:42 UTC) #3
Timur Iskhodzhanov
http://codereview.appspot.com/163081/diff/1/3 File mystl/Vector.h (right): http://codereview.appspot.com/163081/diff/1/3#newcode64 mystl/Vector.h:64: }; In general, it is good to write common ...
16 years, 6 months ago (2009-12-04 15:51:40 UTC) #4
sleeepycat
http://codereview.appspot.com/163081/diff/1/3 File mystl/Vector.h (right): http://codereview.appspot.com/163081/diff/1/3#newcode64 mystl/Vector.h:64: }; ok
16 years, 6 months ago (2009-12-07 13:27:54 UTC) #5
sleeepycat
http://codereview.appspot.com/163081/diff/4001/2006 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4001/2006#newcode6 Main.cpp:6: TEST(Constructor, DefaultValuesTest) { Sorry! I didn't want them to ...
16 years, 6 months ago (2009-12-07 13:37:21 UTC) #6
Timur Iskhodzhanov
General comment: You're trying to test the implementation details, not the contract. For example, http://www.cplusplus.com/reference/stl/vector/push_back/ ...
16 years, 6 months ago (2009-12-07 15:55:50 UTC) #7
sleeepycat
>doesn't require the capacity to be doubled for each reallocation, right? Why not? I can't ...
16 years, 6 months ago (2009-12-08 06:18:52 UTC) #8
sleeepycat
Or do you mean that I should test just the fact that reallallocation been occured? ...
16 years, 6 months ago (2009-12-08 06:26:05 UTC) #9
sleeepycat
I have several questions before continuing working on code http://codereview.appspot.com/163081/diff/4001/2006 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4001/2006#newcode6 Main.cpp:6: ...
16 years, 6 months ago (2009-12-08 07:36:55 UTC) #10
Timur Iskhodzhanov
> This is contract, isn't it? > And here they write that "... causes a ...
16 years, 6 months ago (2009-12-08 15:09:00 UTC) #11
sleeepycat
http://codereview.appspot.com/163081/diff/4001/2006 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4001/2006#newcode26 Main.cpp:26: int_vector4(size, int_default_value); ">Do you need to explicitly specify the ...
16 years, 6 months ago (2009-12-09 10:02:24 UTC) #12
Timur Iskhodzhanov
http://codereview.appspot.com/163081/diff/4001/2006 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4001/2006#newcode26 Main.cpp:26: int_vector4(size, int_default_value); If you test different types, you may ...
16 years, 6 months ago (2009-12-09 16:13:55 UTC) #13
Timur Iskhodzhanov
Looks like you had a newer patchset uploaded. I've missed it, sorry. (next time please ...
16 years, 6 months ago (2009-12-12 15:53:56 UTC) #14
sleeepycat
http://codereview.appspot.com/163081/diff/4001/2006 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4001/2006#newcode26 Main.cpp:26: int_vector4(size, int_default_value); I want to write all the types ...
16 years, 6 months ago (2009-12-14 06:17:53 UTC) #15
sleeepycat
Here is new patchset)
16 years, 6 months ago (2009-12-14 06:29:36 UTC) #16
Timur Iskhodzhanov
http://codereview.appspot.com/163081/diff/4006/2012 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4006/2012#newcode14 Main.cpp:14: TEST(PushBack, EmptyVector) { Actually, no On 2009/12/14 06:17:54, sleeepycat ...
16 years, 6 months ago (2009-12-14 12:34:36 UTC) #17
sleeepycat
http://codereview.appspot.com/163081/diff/4006/2012 File Main.cpp (right): http://codereview.appspot.com/163081/diff/4006/2012#newcode27 Main.cpp:27: TEST(PushBack, SeveralElementsVector) { I made two different tests because ...
16 years, 6 months ago (2009-12-14 13:33:24 UTC) #18
sleeepycat
Here is response. Look through new patchset, please http://codereview.appspot.com/163081/diff/7004/7005 File Main.cpp (right): http://codereview.appspot.com/163081/diff/7004/7005#newcode5 Main.cpp:5: I ...
16 years, 6 months ago (2009-12-15 06:46:34 UTC) #19
Timur Iskhodzhanov
http://codereview.appspot.com/163081/diff/9002/8004 File Main.cpp (right): http://codereview.appspot.com/163081/diff/9002/8004#newcode5 Main.cpp:5: TEST(VectorTest, ConstructorWithDefaultValues) { ConstructorWithDefaultValuesTest http://codereview.appspot.com/163081/diff/9002/8004#newcode13 Main.cpp:13: void PushBackTestCycle(Vector<T> &v, ...
16 years, 6 months ago (2009-12-15 12:27:02 UTC) #20
sleeepycat
http://codereview.appspot.com/163081/diff/9002/8004 File Main.cpp (right): http://codereview.appspot.com/163081/diff/9002/8004#newcode5 Main.cpp:5: TEST(VectorTest, ConstructorWithDefaultValues) { On 2009/12/15 12:27:02, Timur Iskhodzhanov wrote: ...
16 years, 6 months ago (2009-12-16 09:47:58 UTC) #21
Timur Iskhodzhanov
LGTM. If all the tests pass - commit. There are a couple of subtle problems ...
16 years, 6 months ago (2009-12-16 14:34:07 UTC) #22
sleeepycat
I did) 2009/12/16 <timurrrr@gmail.com> > LGTM. > If all the tests pass - commit. > ...
16 years, 5 months ago (2009-12-21 06:20:34 UTC) #23
sleeepycat
16 years, 5 months ago (2009-12-21 06:20:49 UTC) #24
Everythig passes)

2009/12/21 sleeepycat <sleeepycat@gmail.com>

> I did)
>
> 2009/12/16 <timurrrr@gmail.com>
>
> LGTM.
>> If all the tests pass - commit.
>>
>> There are a couple of subtle problems in the test code, but I think it's
>> better to find&fix them later than trying to do everything perfect right
>> away.
>>
>>
>>
>> http://codereview.appspot.com/163081/diff/9002/8004
>> File Main.cpp (right):
>>
>> http://codereview.appspot.com/163081/diff/9002/8004#newcode13
>> Main.cpp:13: void PushBackTestCycle(Vector<T> &v, T &add_value, int
>> start_num, int end_num) {
>> Not exactly, but you did it fine
>>
>> On 2009/12/16 09:47:58, sleeepycat wrote:
>>
>>> Do you mean I can find my start_num from v.size()? I've done that
>>>
>>
>> http://codereview.appspot.com/163081/diff/9002/8004#newcode32
>> Main.cpp:32: PushBackTestCycle(v2, add_value, start_size,
>> number_of_elem);
>> Your variant is OK
>>
>> On 2009/12/16 09:47:58, sleeepycat wrote:
>>
>>> Ok. But I don't understand, why there are int defenitions the first,
>>>
>> then
>>
>>> Vector<int>, then int again. In the next patch merged both int
>>>
>> defenitions
>>
>> http://codereview.appspot.com/163081
>>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b