Skip to content

Suggestion: Move to another unit test framework #822

Open

Description

@TsudaKageyu

CppUnit haven't been able to catch up the latest compilers. I found that it doesn't work well with the latest AppleClang without an option and I made a quick workaround.
Additionally, I have thought all along that CppUnit is not very handy. For example, it requires useless type conversions like:

    // Why I can't compare TagLib::String to a string literal?
    CPPUNIT_ASSERT_EQUAL(f.tag()->title(), String("Title1"));

    // I'd like to simply do:
    CPPUNIT_ASSERT_EQUAL(f.tag()->title(), "Title1");

So I'd like to suggest that we move from CppUnit to another up-to-date unit test framework.
I privately tried Boost.Test and it worked fine. (The diff is here.) Other libraries like Google Test or Catch would be great.

Activity

  1. sbooth commented on Jun 5, 2017

    @sbooth
    Contributor

    I agree, I'm not a fan of CppUnit. I always like boost but I don't know enough about Google Test or Catch to propose a selection.

  2. TsudaKageyu commented on Jun 12, 2017

    @TsudaKageyu
    ContributorAuthor

    I have tried another library Catch. (See 730db7b) I find it really handy and love it.
    Especially, it doesn't require any preparation (like building static libs, adding paths and blah blah blah) even used with Visual Studio since it's a single-header library. Of course, it works fine on either Linux or OSX too.

    I'd like to create a pull request based on the commit 730db7b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions