[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Found bug - need new test? or modify existing test?

Joe Van Dyk

7/5/2005 8:41:00 PM

So, I'm developing some software. It's still pretty early in
development. I have a bunch of tests for the software.

Say I come across a bug that exposes a boundry condition that I didn't
test for.

Should I

a. Modify the test that is responsible for that area of the code to
test for that extra condition.
b. Add a new test that duplicates everything of the test that
supposed to test that area correctly and also tests for the boundry
condition?

In my case, I have a function that's responsible for scanning a string like

"id: 1, x_pos: 23, y_pos: 34 | id: 2, x_pos: 34, y_pos: 34 | "

I was splitting the string at "|" and then doing a regex for id and so
on. But if there's a " | ", then the last thing String#split will
return is a space, and doing a regex on that space for /id:/ messes
things up. So either I could modify the test function to include that
extra " | " at the end, or have a new function that tests for that.


5 Answers

clairbear

5/16/2012 6:01:00 PM

0

"Fred E Brown" <fredebrown@nowhere.com> wrote in
news:4fb3e6d9$0$12437$bb4e3ad8@newscene.com:

> "Sid9" <sid9@ bellsouth.net> wrote in message
> news:jp0odg$sr4$1@dont-email.me...
>> SPIN METER: Rivals Airbrush Anti-Romney Words
>>
>> By THE ASSOCIATED PRESS
>>
>> Published: May 16, 2012 at 1:15 PM ET
>>
>> WASHINGTON (AP) - Remember Newt Gingrich calling Mitt Romney a liar?
>> Michele Bachmann saying Romney's unelectable? Rick Santorum calling
>> Romney "the worst Republican in the country" to run against President
>> Barack Obama?
>>
>> They're hoping you don't. And acting like it never happened (even
>> though most of their words are just clicks away online.)
>>
>> One by one - with the exception of holdout Ron Paul - the GOP
>> also-rans have coughed up endorsements of their onetime rival. And as
>> they do, they're pulling rhetorical backflips to distance themselves
>> from their former harsh assessments of Romney.
>
> They were campaigning against each other, moron. What did you expect
> them to do, endorse each other?
> The best man won and now they are lending him their support.
> Works that way in every election, "Ya dumbass.
>
>
>> Don't try this at home, folks. It takes a professional politician to
>> pull it off with a straight face.
>
> You should put a warning at the top of your posts:
> Warning: The content of this post will be offensive to anyone with an
> ounce of intelligence.

Better watch out you might make poor old sid runa hide behind the plonk
file if you give him too big a dose of truth
Liberals like him are pitiful wretches

clairbear

5/16/2012 6:07:00 PM

0

"Sid9" <sid9@ bellsouth.net> wrote in news:jp0pi5$52o$1@dont-email.me:

> Big news from CNN: Cain endorses Romney....and a nine, nine, nine to
> you , too!

So who is is he gonna support? A lying demcrat community organzer?
You amke us laugh with you silly posts

clairbear

5/17/2012 12:05:00 AM

0

"Sid9" <sid9@ bellsouth.net> wrote in news:jp10va$pbp$1@dont-email.me:

> clairbear" <SidIsSilly@msn.com> wrote in message
> news:XnsA0558F8EE5959clairbear@216.196.97.142...
>> "Sid9" <sid9@ bellsouth.net> wrote in news:jp0pi5$52o$1@dont-email.me:
>>
>>> Big news from CNN: Cain endorses Romney....and a nine, nine, nine to
>>> you , too!
>>
>> So who is is he gonna support? A lying demcrat community organzer?
>> You amke us laugh with you silly posts
>
> Shucks...I wanted to reread the article I posted and it's gone......

OOPS ITS GONE AGAIN It would actually be news if the republicans came out
to endorse The Community organizer Otherwise it is just the party faithfull
support the party slate I remember all the bad blood between Hillary and
Obama now she's best pals and part of his WH cabal No big news she just
took one for the party

clairbear

5/17/2012 12:31:00 AM

0

"Sid9" <sid9@ bellsouth.net> wrote in news:jp1ft2$s82$1@dont-email.me:

> Subject: Re: Remember Newt Gingrich calling Mitt Romney a liar?
> Michele Bachmann saying Romney's unelectable? Rick Santorum calling
> Romney "the worst Republican in the country" to run against President
> Barack Obama? From: "Sid9" <sid9@ bellsouth.net>
> Newsgroups:
> alt.fan.rush-limbaugh,alt.politics.economics,alt.politics.republicans,a
> lt.politics.usa
>
>
> "clairbear" <CutSidsBS@msn.com> wrote in message
> news:XnsA055CC4C9855Dclairbear@216.196.97.142...
>> "Sid9" <sid9@ bellsouth.net> wrote in
>> news:jp10va$pbp$1@dont-email.me:
>>
>>> clairbear" <SidIsSilly@msn.com> wrote in message
>>> news:XnsA0558F8EE5959clairbear@216.196.97.142...
>>>> "Sid9" <sid9@ bellsouth.net> wrote in
>>>> news:jp0pi5$52o$1@dont-email.me:
>>>>
>>>>> Big news from CNN: Cain endorses Romney....and a nine, nine, nine
>>>>> to you , too!
>>>>
>>>> So who is is he gonna support? A lying demcrat community organzer?
>>>> You amke us laugh with you silly posts
>>>
>>> Shucks...I wanted to reread the article I posted and it's gone......
>>
>> OOPS ITS GONE AGAIN It would actually be news if the republicans came
>> out to endorse The Community organizer Otherwise it is just the party
>> faithfull
>> support the party slate I remember all the bad blood between Hillary
>> and Obama now she's best pals and part of his WH cabal No big news
>> she just took one for the party
>
> Whoops.....I'll use my magic wand and make it reappear......
>
> Abra
> Cadabra...............................
>
> These words are delicious with a little ketchup!

You need help you are seriously off the looney tooney reservation
Now take your med like a good little leftie loon and have your nurse strap
you down for the night so you don't injure yourself

Waldo Tunnel

5/17/2012 9:26:00 AM

0

On May 16, 10:44 am, "Fred E Brown" <fredebr...@nowhere.com> wrote:
> "Sid9" <sid9@ bellsouth.net> wrote in message
>
> news:jp0odg$sr4$1@dont-email.me...
>
>
>
>
>
>
>
>
>
> > SPIN METER: Rivals Airbrush Anti-Romney Words
>
> > By THE ASSOCIATED PRESS
>
> > Published: May 16, 2012 at 1:15 PM ET
>
> > WASHINGTON (AP) - Remember Newt Gingrich calling Mitt Romney a liar?
> > Michele Bachmann saying Romney's unelectable? Rick Santorum calling Romney
> > "the worst Republican in the country" to run against President Barack
> > Obama?
>
> > They're hoping you don't. And acting like it never happened (even though
> > most of their words are just clicks away online.)
>
> > One by one - with the exception of holdout Ron Paul - the GOP also-rans
> > have coughed up endorsements of their onetime rival. And as they do,
> > they're pulling rhetorical backflips to distance themselves from their
> > former harsh assessments of Romney.
>
> They were campaigning against each other, moron. What did you expect them
> to do, endorse each other?
> The best man won and now they are lending him their support.
> Works that way in every election, "Ya dumbass.
>
> > Don't try this at home, folks. It takes a professional politician to pull
> > it off with a straight face.
>
> You should put a warning at the top of your posts:
> Warning: The content of this post will be offensive to anyone with an ounce
> of intelligence.

In other words you loved it.