Simple Build tools and Unit Tests working

We are making progress with our C implementation. We have implemented a make language so we can create makefiles for GCC. On top of that, we have implemented a build configuration language where we simply reference the modules that should go into an executable, and the corresponding makefile is generated.

We have also made progress with the unit testing support. We can now declare test cases with assert statements and run them from within make. We can also build the programs and run the tests completely from the command line. Here is a sample test case:

We have a simple logging language which, because of the fact that we generate the code from the logging statements, can be turned off without overhead and automatically inserts into the code the location of the log statement, making it easy to understand the context of the log message.

Finally, we have also implemented expression blocks, which allow you to use a block of statements where C expects an expression. The generator reduces this to an additional function and a function call to that function in place of the block expression. This is extremely useful for building generators. For example, the facility used to call test cases is based on this mechanism.

So this was a very productive weekend 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s