[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Unit test approach for Ruby extension

yue_nicholas

8/10/2006 5:44:00 AM

Hi,

I am writing a Ruby extension in C++.

Do we write unit test separately for the C++ code and the Ruby code?

I am familar with cppunit and recently with Ruby's build in unit
testing facility.

Could someone advice?

Thanks in advance.

Cheers

25 Answers

Eric Hodel

8/10/2006 5:43:00 PM

0

On Aug 9, 2006, at 10:45 PM, yue_nicholas@hotmail.com wrote:

> Hi,
>
> I am writing a Ruby extension in C++.
>
> Do we write unit test separately for the C++ code and the Ruby code?
>
> I am familar with cppunit and recently with Ruby's build in unit
> testing facility.
>
> Could someone advice?
>
> Thanks in advance.

I would test it from ruby because it is easier to write ruby code
than C++ code.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



Bil Kleb

8/11/2006 8:50:00 AM

0

Eric Hodel wrote:
> yue_nicholas@hotmail.com wrote:
>>
>> Do we write unit test separately for the C++ code and the Ruby code?
>
> I would test it from ruby because it is easier to write ruby code than
> C++ code.

Concur.

We even went that route for a stand-alone C code. We briefly
looked at using swig to do the interface, but ended up writing
the interface code by hand.

Regards,
--
Bil
http://fun3d.lar...

JAB

6/3/2012 2:37:00 AM

0

On Sat, 02 Jun 2012 16:07:27 -0400, dave.k@att.net wrote:

>I still think the cost of e-books is too high

As the prices rise, the readership drops...economics 101.

Considering what's on Internet, who needs an "e-book?"

Ernie B.

6/3/2012 6:39:00 PM

0

On Sat, 02 Jun 2012 16:07:27 -0400 dave.k@att.net wrote:

> Yes, a reply to a very old post. There is a reason though; Things
> become clearer with time, sometimes.
>
> So, here some rebuttal, and some support.
>
> <http://news.cnet.com/8301-1023_3-57412587-93/why-e-books-cost-so...
> <http://online.wsj.com/article/SB1000142405270230444460457733757305461515...
>
If you're unhappy with a situation, work to change it. It helps if you can
avoid breaking any laws. 'Twas ever thus.

> I still think the cost of e-books is too high.
>
Don't buy any, then. There are free e-books available. Calibre
<http://calibre-eboo... can help you find them and Project Gutenburg
<http://www.gutenber... has free downloads of classics.
--
Ernie B.

Communication: The art of moving an idea from one mind to another, hopefully
without distortion.

Ernie B.

6/3/2012 6:50:00 PM

0

On Sat, 02 Jun 2012 21:37:22 -0500 JAB wrote:

> On Sat, 02 Jun 2012 16:07:27 -0400, dave.k@att.net wrote:
>
> >I still think the cost of e-books is too high
>
> As the prices rise, the readership drops...economics 101.
>
> Considering what's on Internet, who needs an "e-book?"
>
Someone who wants to have copies of "Tom Sawyer", "Huckleberry Finn", "Great
Expectations" and "A Tale Of Two Cities" conveniently available in a small
package. A Kindle or Nook costs about $200.00, half the price of an iPad.
--
Ernie B.

Communication: The art of moving an idea from one mind to another, hopefully
without distortion.

Jim Rusling

6/4/2012 1:18:00 PM

0

Ernie B. <ernie-baresch_REMOVE_@_THIS_neb.rr.com> wrote:

>On Sat, 02 Jun 2012 21:37:22 -0500 JAB wrote:
>
>> On Sat, 02 Jun 2012 16:07:27 -0400, dave.k@att.net wrote:
>>
>> >I still think the cost of e-books is too high
>>
>> As the prices rise, the readership drops...economics 101.
>>
>> Considering what's on Internet, who needs an "e-book?"
>>
>Someone who wants to have copies of "Tom Sawyer", "Huckleberry Finn", "Great
>Expectations" and "A Tale Of Two Cities" conveniently available in a small
>package. A Kindle or Nook costs about $200.00, half the price of an iPad.

I think that you can get a wifi Kindle for about $79.
--
Jim Rusling
More or Less Retired
Mustang, OK
www.rusling.org

Ernie B.

6/4/2012 4:03:00 PM

0

On Mon, 04 Jun 2012 08:18:26 -0500 Jim Rusling wrote:

> I think that you can get a wifi Kindle for about $79.
>
IIRC our wifi/3G Kindle cost $119.95 at Staples about a year ago.
--
Ernie B.

Communication: The art of moving an idea from one mind to another, hopefully
without distortion.

Dave K

6/4/2012 11:46:00 PM

0

On Sun, 3 Jun 2012 13:39:23 -0500, Ernie B.
<ernie-baresch_REMOVE_@_THIS_neb.rr.com> wrote:

>On Sat, 02 Jun 2012 16:07:27 -0400 dave.k@att.net wrote:
>
>> Yes, a reply to a very old post. There is a reason though; Things
>> become clearer with time, sometimes.
>>
>> So, here some rebuttal, and some support.
>>
>> <http://news.cnet.com/8301-1023_3-57412587-93/why-e-books-cost-so...
>> <http://online.wsj.com/article/SB1000142405270230444460457733757305461515...
>>
>If you're unhappy with a situation, work to change it. It helps if you can
>avoid breaking any laws. 'Twas ever thus.

I just don't buy them...
>
>> I still think the cost of e-books is too high.
>>
>Don't buy any, then. There are free e-books available. Calibre
><http://calibre-eboo... can help you find them and Project Gutenburg
><http://www.gutenber... has free downloads of classics.

I have several classics on my Kindle. Those, as you point out, are
free.

I have also bought a few books, but I ask you, why would I pay
$12.99 for an e-book when I can get the paperback for $7.95, or go to
the library, and borrow it for free.

--

"In spite of the cost of living, it's still popular."
~ Kathy Norris

Ernie B.

6/5/2012 2:01:00 AM

0

On Mon, 04 Jun 2012 19:45:49 -0400 dave.k@att.net wrote:

> I have also bought a few books, but I ask you, why would I pay
> $12.99 for an e-book when I can get the paperback for $7.95, or go to
> the library, and borrow it for free.
>
Paperbacks tend to be fragile, get dog-eared and wear out. That happened to
my copy of "Lord of the Rings". Library books must be returned.
--
Ernie B.

Communication: The art of moving an idea from one mind to another, hopefully
without distortion.

JAB

6/5/2012 2:46:00 AM

0

On Mon, 4 Jun 2012 21:00:34 -0500, Ernie B.
<ernie-baresch_REMOVE_@_THIS_neb.rr.com> wrote:

>Library books must be returned.

Different strokes...but I don't recall reading a book twice, but I
have watched several movies twice.

For a movie, "the thrill is gone" type of feeling when watching it
twice, years later.