| 868 | : VerifyApplication::Test(name,isa,VerifyApplication::TEST_SHOULD_PASS) {} |
| 869 | |
| 870 | VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent) |
| 871 | { |
| 872 | std::string cfg = state->rtcore + ",isa="+stringOfISA(isa); |
| 873 | RTCDeviceRef device = rtcNewDevice(cfg.c_str()); |
| 874 | errorHandler(nullptr,rtcGetDeviceError(device)); |
| 875 | |
| 876 | RTCGeometry geom0 = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_TRIANGLE); |
| 877 | rtcSetGeometryUserData(geom0,(void*)1); |
| 878 | RTCGeometry geom1 = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_QUAD); |
| 879 | rtcSetGeometryUserData(geom1,(void*)2); |
| 880 | RTCGeometry geom2 = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_GRID); |
| 881 | rtcSetGeometryUserData(geom2,(void*)3); |
| 882 | RTCGeometry geom3 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SUBDIVISION); |
| 883 | rtcSetGeometryUserData(geom3,(void*)4); |
| 884 | RTCGeometry geom4 = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE); |
| 885 | rtcSetGeometryUserData(geom4,(void*)5); |
| 886 | RTCGeometry geom5 = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE); |
| 887 | rtcSetGeometryUserData(geom5,(void*)6); |
| 888 | RTCGeometry geom6 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_USER); |
| 889 | rtcSetGeometryUserData(geom6,(void*)7); |
| 890 | AssertNoError(device); |
| 891 | |
| 892 | if ((size_t)rtcGetGeometryUserData(geom0 ) != 1) return VerifyApplication::FAILED; |
| 893 | if ((size_t)rtcGetGeometryUserData(geom1 ) != 2) return VerifyApplication::FAILED; |
| 894 | if ((size_t)rtcGetGeometryUserData(geom2 ) != 3) return VerifyApplication::FAILED; |
| 895 | if ((size_t)rtcGetGeometryUserData(geom3 ) != 4) return VerifyApplication::FAILED; |
| 896 | if ((size_t)rtcGetGeometryUserData(geom4 ) != 5) return VerifyApplication::FAILED; |
| 897 | if ((size_t)rtcGetGeometryUserData(geom5 ) != 6) return VerifyApplication::FAILED; |
| 898 | if ((size_t)rtcGetGeometryUserData(geom6 ) != 7) return VerifyApplication::FAILED; |
| 899 | AssertNoError(device); |
| 900 | |
| 901 | rtcReleaseGeometry(geom0); |
| 902 | rtcReleaseGeometry(geom1); |
| 903 | rtcReleaseGeometry(geom2); |
| 904 | rtcReleaseGeometry(geom3); |
| 905 | rtcReleaseGeometry(geom4); |
| 906 | rtcReleaseGeometry(geom5); |
| 907 | rtcReleaseGeometry(geom6); |
| 908 | |
| 909 | AssertNoError(device); |
| 910 | |
| 911 | return VerifyApplication::PASSED; |
| 912 | } |
| 913 | }; |
| 914 | |
| 915 | struct BufferStrideTest : public VerifyApplication::Test |
nothing calls this directly
no test coverage detected