         View view_x(x);
         View view_y(y);
         cusp::blas::copy(cublas, view_x, view_y);
-        ASSERT_EQUAL(x, y);
-    }
-
-    if(cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS)
-    {
-      throw cusp::runtime_exception("cublasDestroy failed");
-    }
-}
-DECLARE_UNITTEST(TestCUBLAScopy);
-
+        ASSERT_EQUAL(x==y, true);
+    }
+
+    if(cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS)
+    {
+      throw cusp::runtime_exception("cublasDestroy failed");
+    }
+}
+DECLARE_NUMERIC_UNITTEST(TestCUBLAScopy);
+
+template<typename ValueType>
 void TestCUBLASdot(void)
 {
-    typedef cusp::device_memory MemorySpace;
-    typedef typename cusp::array1d<float, MemorySpace>       Array;
-    typedef typename cusp::array1d<float, MemorySpace>::view View;
+    typedef cusp::array1d<ValueType, cusp::device_memory>  Array;
+    typedef typename Array::view                           View;
 
     cublasHandle_t handle;
 


    ASSERT_EQUAL(cusp::blas::nrm2(cublas, View(x)), 10.0f);
}
DECLARE_UNITTEST(TestCUBLASnrm2);

void TestCUBLASscal(void)
{
    typedef cusp::device_memory MemorySpace;
    typedef typename cusp::array1d<float, MemorySpace>       Array;
    typedef typename cusp::array1d<float, MemorySpace>::view View;

    cublasHandle_t handle;


      throw cusp::runtime_exception("cublasDestroy failed");
    }
}
DECLARE_REAL_UNITTEST(TestCUBLASdot);

template<typename ValueType>
void TestCUBLASnrm2(void)
{
    typedef cusp::array1d<ValueType, cusp::device_memory>  Array;
    typedef typename Array::view                           View;

    cublasHandle_t handle;

