xref: /libCEED/tests/t000-ceed.c (revision 2b730f8b5a9c809740a0b3b302db43a719c636b1)
1c907536fSjeremylt /// @file
2c907536fSjeremylt /// Test creation and destruction of a CEED object
3c907536fSjeremylt /// \test Test creation and destruction of a CEED object
4c907536fSjeremylt #include <ceed.h>
5c907536fSjeremylt 
6c907536fSjeremylt int main(int argc, char **argv) {
7c907536fSjeremylt   Ceed ceed;
8c907536fSjeremylt 
91070991dSJed Brown   {
101070991dSJed Brown     int major, minor, patch;
11*2b730f8bSJeremy L Thompson 
121070991dSJed Brown     CeedGetVersion(&major, &minor, &patch, NULL);
13*2b730f8bSJeremy L Thompson     if (!CEED_VERSION_GE(major, minor, patch)) printf("Library version mismatch %d.%d.%d\n", major, minor, patch);
141070991dSJed Brown   }
151070991dSJed Brown 
16c907536fSjeremylt   CeedInit(argv[1], &ceed);
17c907536fSjeremylt   CeedDestroy(&ceed);
18cd1fe911SJeremy L Thompson 
19cd1fe911SJeremy L Thompson   // Test double destroy is safe
20cd1fe911SJeremy L Thompson   CeedDestroy(&ceed);
21c907536fSjeremylt   return 0;
22c907536fSjeremylt }
23