New project: DUnitAssertions

With the cats all in the hospital, I’ve been looking for something to keep me busy, so I don’t spend all my time worrying. So it’s been a good time to work on one of my latest projects: DUnitAssertions. The goal is to make NUnitLite-style assertions available in Delphi and DUnit.

This was an interesting problem from the beginning, because several of the names used in NUnitLite aren’t available in Delphi. Here’s what a typical NUnitLite assertion might look like:

Assert.That(2 + 2, Is.EqualTo(4));

They’ve got a class called Assert with static methods, and another class called Is with static methods. Neither of those is going to fly in Delphi, because Assert is a semi-magic method, and is is a flat-out keyword. (This is one of those cases where using a case-insensitive language is a major pain!)

So I’m changing the syntax to look like one or the other of these:

Expect.That(2 + 2, Tis.EqualTo(4));
Expect.That(2 + 2, Be.EqualTo(4));

I was originally going to use the second line, ’cause it sounds all pirate-y (though obviously it could use an “Arr!” somewhere). But then Brian suggested “Tis”, pointing out that putting a “T” on the beginning of “Is” is more the Delphi way. And it sounds kind of poetic. Two plus two, ’tis four. Classy, no?

Interestingly enough, the following is perfectly valid Delphi syntax, even though not is very much a keyword:

Expect.That(2 + 2, Tis.Not.EqualTo(5));

I think this became possible in Delphi 8, when they tweaked the naming rules for .NET support. If it’s after a dot, they can safely consider it to be an identifier instead of a keyword.

Cat recall

All four of our cats are in the hospital now.

Jennie took Stefan, Tycho, and Noel to the vet this afternoon to be checked, since they’ve all been eating the same (recalled) food. All of their blood tests came back with high levels of bad stuff. Nowhere near as high as Goober’s, and their kidneys didn’t appear to be swollen, but the levels still well above the upper bound of the “good” range. So they’re all on IV fluids for 48 hours to try to flush it out of their systems too.

It’s going to be weird being in a house with no cats. They’ll re-test Goober tomorrow night, but he’ll probably be in the hospital for a few more days after that.

On the plus side, he did pee a couple of times today, so his kidneys are pulling at least some of their weight. It’s too soon to know much more.

Goober and the cat-food recall

Until I took Goober to the vet tonight, I didn’t know that the pet-food recall had expanded to a second manufacturer.

Now I do. Hills Veterinary Diet m/d formula — the food that all four of our cats eat.

(Well, did eat. They sure as hell don’t anymore.)

Goober hadn’t been himself for a few days. He wasn’t interested in playing, and he had thrown up a few times, both of which are extremely unusual for him.

He’s still at the vet. His kidneys are enlarged, and a couple of the counts from his blood tests were about 10x what they should be (I’m not sure of details — I was in no frame of mind to be taking notes). They’re treating it as acute renal failure: they’re putting him on intravenous fluids, to flush the bad stuff out of his system.

He’ll be in the hospital for 48 hours (during which we can visit him as often as we like), and then they’ll do the blood tests again. All we can do is wait, and hope. And bring the other three cats in so we can get them checked too. And be glad that we hadn’t spent any of our tax refund yet. And pick up some different cat food in the morning — at a different vet’s office. Our vet’s office is sold out of the alternative they’re recommending.

(Apparently the vet’s office had called us to warn us of the recall, but they called Jennie’s cell phone, which I had taken out of town with me this weekend. Since I have no clue how to check her voicemail and I didn’t get back until today, we hadn’t gotten the news. Maybe this is a compelling reason to drop the land line, and finally get me a cell phone.)

Getting to sleep tonight will be an interesting challenge. So will focusing on work tomorrow. Wish me — and especially Goober — luck.