← Back to team overview

touch-packages team mailing list archive

[Bug 1542906] Re: unity::scopes::testing::TypedScopeFixture<> usage always fails

 

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1542906

Title:
  unity::scopes::testing::TypedScopeFixture<> usage always fails

Status in unity-scopes-api package in Ubuntu:
  New

Bug description:
  Following the official documentation at the Ubuntu developer gateway
  https://developer.ubuntu.com/api/scopes/cpp/sdk-15.04.1 I tried to
  create a scope fixture to use in my test cases using the
  unity::scopes::testing::TypedScopeFixture<> template to wrap my Scope
  class.

  The unit tests always fail at runtime with an error similar to the following.
    [ RUN      ] ScopeFixture.surfacing_query
    /usr/include/unity-scopes-1.0/unity/scopes/testing/TypedScopeFixture.h:90: Failure
    Expected: scope->start(ScopeTraits<Scope>::name()) doesn't throw an exception.

  Turns out the problem is that the TypedScopeFixture template class
  does not call the required initialization functions in its
  constructor.  It's not possible to work around this by driving from
  TypedScopeFixture because the required initialization functions (for
  example, TypedScopeFixtureHelper::set_scope_directory()) are private
  static member functions in another class.  The only workaround is to
  include a modified copy of TypedScopeFixture.h in my own project.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1542906/+subscriptions


References