[tests] Fix and test value type string of topology primitives
Note that Point does not pass the test
The introduced tests don't pass on non-Windows OS
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if
- it builds with SUCCESS for all platforms on the CI.
- it does not generate new warnings.
- it does not generate new unit test failures.
- it does not generate new scene test failures.
- it does not break API compatibility.
- it is more than 1 week old (or has fast-merge label).
What does Point return @alxbilger ?
Element<Point> and vector<Element<Point>,CPUMemoryManager<Element<Point>>>
Maybe Element<Point> does not make sense...
and do you know why this? maybe @epernod would know this
I tried and on macOS and Ubuntu/gcc :
-
EXPECT_EQ(std::string{sofa::geometry::ElementInfo<sofa::geometry::Point>::name()}, "Point");test passes -
EXPECT_EQ(defaulttype::DataTypeName<sofa::topology::Element<sofa::geometry::Point> >::name(), "Point");does not (return Element<Point> as you said)
After some investigation, DataTypeInfo<topo::Element<geo::Point> does not exist so it uses the default decoder.
IMO, It was not implemented because topology::Point (which should be an alias on topo::Element<geo::Point>) is not defined. I dont remember why it was not done while Sofa.Topo and Sofa.Geo was created. Maybe topology::Point does not make sense ? (in a topology point of view)
If in the end it does, making the alias (and adding the typeinfo) does work. (see https://github.com/alxbilger/sofa/pull/8 )
@lamriaimen could you try that with this branch you don't have any widget registration issue with SofaImGui ? Thanks
[ci-test][with-all-tests]
@alxbilger no errors were generated when i tried to run it with imgu. the problem of "[DataWidgetFactory] Cannot add widget vector<> into the factory" is solved i guess.
[ci-build][with-all-tests]