How to implement unit tests for Clipper?

Asked

Viewed 224 times

3

I have a legacy system developed in Clipper, an old programming language, similar to C and which had discontinued support for at least 20 years, being maintained until today by the project xHarbour, which provides the current compiler for Clipper.

I would like to implement unit tests in the next features that will be developed in Clipper, but do not know and found no tool for this purpose, similar to Junit java.

Someone knows an alternative?

  • 2

    Is it similar to C++? I’ve been working with this for over 30 years and I’ve never seen this resemblance. You may be the first clipper to take unit test, so you have to do everything in hand. The Harbour has received more attention than xHB.

  • 1

    C++ has nothing to do with Clipper. I found it curious to be using xHarbour today, as today Harbour has gained a much greater traction. As for what was asked, I think the simplest is to make one. test prg and link conditionally, using an Init Procedure even to call the functions and compare with what it expects. It may not be so "automatic", but it’s simple to maintain. Additionally, you can create a lot of ASSERT in the code, and eliminate the final product with a #xtranslate ASSERT => (empty)

  • 1

    Boy, I worked with Clipper a long time, I didn’t even know that any place still worked with that kind of language. And definitely Clipper has nothing to do with C++.

  • @Andréluismarmo xbase languages are still among the most used in applications in Brazil. Little in new development, but much in legacy. See: http://answall.com/q/43902/101.

1 answer

2


I found the hbunit. I don’t know if it’s good, if it works, or how you use it, but it seems easy to take with what’s in the repository, I can only give my opinion that I don’t like the style of code adopted in this project.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.