On Monday, 5 August 2013 at 17:38:22 UTC, monarch_dodra wrote:
So sure, I guess that strictly speaking, no, D language doesn't have static unittests. However, when someone asks the question, if you just answer "No" without pointing out that the language allows this semantic:

version(unittest) assertCTFEAble!({
    //YOUR CODE HERE
});

Then I believe you are giving an incomplete answer.

Well, the problem is, D does have static unit-tests in a form of `static assert`. But topic starter has immediately provided an example that shows that his understanding of "static unit-tests" is different one, making it pretty hard to reason about proper alternative.

Even assertCTFEAble does not _exactly_ match what was asked here. Thus I feel the need to first ask about specific use case and only then propose any real solutions.

So, yes, of course, it is incomplete - because question is incomplete and requires further clarification. Which is the main point.

Reply via email to