Skip to content

[tests] Fix a couple of imports in tests and disable broken static assertions for now #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Fohlen
Copy link
Contributor

@Fohlen Fohlen commented Dec 11, 2018

This add's missing includes for some tests. The static_assert calls are apparently broken but I couldn't identify why this is so far (from code logic it should run). The output is as follows:

/Users/fohlen/workspace/libsigcplusplus/tests/test_tuple_transform_each.cc:47:5: error: static_assert failed due to requirement 'std::is_same<decltype(t_transformed), decltype(t_expected)>::value'
      "unexpected transform_each()ed tuple type"
    static_assert(std::is_same<decltype(t_transformed), decltype(t_expected)>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/fohlen/workspace/libsigcplusplus/tests/test_tuple_transform_each.cc:63:5: error: static_assert failed due to requirement 'std::is_same<decltype(t_transformed), decltype(t_expected)>::value'
      "unexpected transform_each()ed tuple type"
    static_assert(std::is_same<decltype(t_transformed), decltype(t_expected)>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/fohlen/workspace/libsigcplusplus/tests/test_tuple_transform_each.cc:113:3: error: static_assert failed due to requirement 'std::is_same<decltype(t_transformed), decltype(t_expected)>::value'
      "unexpected transform_each()ed tuple type"
  static_assert(std::is_same<decltype(t_transformed), decltype(t_expected)>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/fohlen/workspace/libsigcplusplus/tests/test_tuple_transform_each.cc:164:3: error: static_assert failed due to requirement 'std::is_same<decltype(t_transformed), decltype(t_expected)>::value'
      "unexpected transform_each()ed tuple type"
  static_assert(std::is_same<decltype(t_transformed), decltype(t_expected)>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/fohlen/workspace/libsigcplusplus/tests/test_tuple_transform_each.cc:212:3: error: static_assert failed due to requirement 'std::is_same<decltype(t_transformed), decltype(t_expected)>::value'
      "unexpected transform_each()ed tuple type"
  static_assert(std::is_same<decltype(t_transformed), decltype(t_expected)>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I compiled the tests on a Mac OSX 10.14.1 with Apple LLVM version 10.0.0 (clang-1000.10.44.4) and cmake version 3.12.3

@murraycu
Copy link
Contributor

These are based on files in murrayc-tuple-utils. You might try building that, to get to the heart of whatever is wrong.

@Fohlen
Copy link
Contributor Author

Fohlen commented Dec 21, 2018

I will check whether I can figure out the error in murrayc-tuple-utils (I have reproduced them in the test cases there) and open a PR so the changes can come from upstream. Meanwhile I suggest to merge the other changes (excluding tests/test_tuple_transform_each.cc) since these are really only missing includes that are required for clang

@Fohlen Fohlen force-pushed the fix_osx_compilation_warnings branch from 7d6fbbd to 83ad329 Compare December 21, 2018 11:28
kjellahl pushed a commit that referenced this pull request Jan 2, 2019
@kjellahl
Copy link
Contributor

kjellahl commented Jan 2, 2019

I have pushed a commit which is identical to your commit in this PR except for
the commit message. My commit message does not mention the static assertions.
They have not been disabled. The g++ compiler accepts them.

@Fohlen
Copy link
Contributor Author

Fohlen commented Jan 2, 2019

Thanks @kjellahl

@Fohlen Fohlen closed this Jan 2, 2019
@murraycu
Copy link
Contributor

I have made the same change in murrayc-tuple-utils, so we don't lose it when the code is copied from there next time: murraycu/murrayc-tuple-utils@5ffb094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants