MicroTest 1.3 / MicroStub 1.1: still under 4KB

Posted by Mathew Abonyi Wed, 24 Jan 2007 06:33:07 GMT

MicroTest has had a few tweaks, making it more brief and efficient at what it does. Also, I added a setup and teardown interface which can be used. For example, I removed the use of ObjectSpace and squeezed a few percent of performance just from that. On my 1.83GHz, the 6 tests of the self test now consistently take around 500 microseconds (or 0.0005 seconds). Pretty nippy.

MicroStub had a little problem with it—it stubbed instance methods and didn’t return the class back to normal. So, it violated one of the most basic principles of testing: isolated tests. That’s all fixed now, using some Spartan back-and-forth aliasing. Obviously a double stub will fail. Maybe I’ll fix that later.

Lastly, I added a benchmarking test case, really just useful for profiling.

Of course, the library is still under 4KB—in fact, it’s 3940 bytes.

Have a look at the repository (revision 25) for the latest version.

Posted in  | no comments | 4 trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://www.mathewabonyi.com/articles/trackback/44

  1. From Xanax online.
    Drug interactions depression xanax.
    Purchashing xanax with mastercard. Xanax xr crushed. Xanax.
  2. From Ambien.
    Ambien addiction.
    Ambien dosage. Ambien during pregnancy. Ambien sleeping pill. Ambien. Ambien halluciantions amnesia. Long term ambien. Canada overnight ambien. Discount ambien. Buy ambien.
  3. From Underage porn star.
    Underage porn.
    Free underage incest porn. Underage porn. Sex and underage porn. Illegal underage porn. Porn underage. Brutal underage fucking porn.
  4. From Brutal underage fucking porn.
    Underage porn.
    Underage fucking porn. Underage porn. Underage porn bbs.

(leave url/email »)

   Comment Markup Help Preview comment