The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Test::Unit makes me write better C code

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Test::Unit makes me write better C code Posted: Mar 18, 2005 11:24 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Test::Unit makes me write better C code
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
Today, once again, Nathaniel Talbott's Test::Unit helped me eliminate some bad C code in a Ruby extension that I'm writing. You see, Test::Unit has a good habit of causing the interpreter to segfault/core-dump where seemingly straightforward sample programs work without incident.


Why is this good? Because 99% of the time it means you've got some bad C code somewhere. I've learned that this *usually* means that you've got a memory leak buried somewhere in your C code. Or you're using a pointer to some data structure incorrectly in some fashion. I don't mean the sorts of things that are going to get picked up by -Wall, either.


I can't remember why Test::Unit (inadvertently) finds these bugs. Nathaniel told me once and I've forgotten (again). But, whatever. It works and I'm thankful. :)

Read: Test::Unit makes me write better C code

Topic: Chihuahua with a messiah complex Previous Topic   Next Topic Topic: Why Rails looks so good (and why it matters)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use