     ASSERT_EQUAL(output[4], 1);
     ASSERT_EQUAL(output[5], 0);
     ASSERT_EQUAL(output[6], 0);
+    ASSERT_EQUAL_QUIET(result, thrust::make_counting_iterator(5));
 }
 DECLARE_UNITTEST(TestForEachSimpleAnySpace);
 

    h_f.ptr = &h_output[0];
    d_f.ptr = (&d_output[0]).get();
    
    thrust::for_each(h_input.begin(), h_input.end(), h_f);
    thrust::for_each(d_input.begin(), d_input.end(), d_f);

    ASSERT_EQUAL(h_output, d_output);
}
DECLARE_VARIABLE_UNITTEST(TestForEach);


    mark_present_for_each<int> f;
    f.ptr = thrust::raw_pointer_cast(output.data());

    thrust::counting_iterator<int> result = thrust::for_each(thrust::make_counting_iterator(0), thrust::make_counting_iterator(5), f);

    ASSERT_EQUAL(output[0], 1);
    ASSERT_EQUAL(output[1], 1);
