Donate Share

Template Unit Test Framework

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Unit testing a Template

You are viewing a single message from this topic. View all messages.

  1. 2009-08-04 13:00:37 UTC
    Right, my bad I've forgotten about that. However, it must be a bug in your code still.
    I've just tested this concept and it compiles perfectly well:

    #include <tut.hpp>

    template <typename T>
    struct Blob
    {
    T data;
    };

    namespace tut
    {
    struct blob_data
    {
    struct blob
    {
    int value;
    };
    };

    typedef test_group<blob_data> group;
    typedef group::object object;
    group mytest_group("mytest");

    template<>
    template<>
    void object::test<1>()
    {
    Blob<blob> b;
    b.data;
    b.data.value;
    }

    } // namespace tut
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.