1 /// @file 2 /// Test CeedVectorDestroy state counter 3 /// \test Test CeedVectorDestroy state counter 4 #include <ceed.h> 5 6 int main(int argc, char **argv) { 7 Ceed ceed; 8 CeedVector x; 9 CeedInt n; 10 CeedScalar *a; 11 12 CeedInit(argv[1], &ceed); 13 14 n = 10; 15 CeedVectorCreate(ceed, n, &x); 16 CeedVectorSetValue(x, 0.0); 17 CeedVectorGetArray(x, CEED_MEM_HOST, &a); 18 19 // Write access not restored should generate an error 20 CeedVectorDestroy(&x); 21 22 // LCOV_EXCL_START 23 CeedDestroy(&ceed); 24 return 0; 25 // LCOV_EXCL_STOP 26 } 27