22 #include "testing/testing.h"
29 ~FreeMe() { (*freed)++; }
33 TEST(ScopedPtr, NullDoesNothing) {
34 scoped_ptr<FreeMe>
x(
NULL);
38 TEST(ScopedPtr, FreesWhenOutOfScope) {
41 scoped_ptr<FreeMe> scoped(
new FreeMe(&frees));
47 TEST(ScopedPtr, Operators) {
49 scoped_ptr<FreeMe> scoped(
new FreeMe(&tag));
54 TEST(ScopedPtr, Reset) {
56 scoped_ptr<FreeMe> scoped(
new FreeMe(&frees));
58 scoped.reset(
new FreeMe(&frees));
62 TEST(ScopedPtr, ReleaseAndGet) {
64 FreeMe* allocated =
new FreeMe(&frees);
65 FreeMe* released =
NULL;
67 scoped_ptr<FreeMe> scoped(allocated);
70 released = scoped.release();
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
TEST(PolynomialCameraIntrinsics2, ApplyOnFocalCenter)