GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — QuEST/tests at main · QuEST-Kit/QuEST

Expand file tree

/

tests

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

tests

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
deprecated
deprecated
 
 
integration
integration
 
 
unit
unit
 
 
utils
utils
 
 
CMakeLists.txt
CMakeLists.txt
 
 
README.md
README.md
 
 
main.cpp
main.cpp
 
 

README.md

🧪  Tests

This folder contains QuEST's extensive tests. See compile.md and launch.md to get them running.

The subdirectories are:

  • utils containing test utilities, including non-optimised functions against which QuEST output is compared.
  • unit containing unit tests which test individual QuEST functions in isolation, under their entire input domains (where feasible).
  • integration containing integration tests which test multiple QuEST functions working at scale.
  • deprecated containing v3's tests and utilities, only used when explicitly activated.

The tests use Catch2 and are generally structured as

TEST_CASE( "someApiFunc", "[funcs]" ) {

    PREPARE_TEST(...)

    SECTION( "correctness" ) {

        SECTION( "statevector" ) {

            auto a = getApiResult();
            auto b = getReferenceResult();
            REQUIRE_AGREE(a, b);
        }

        SECTION( "density matrix" ) {

            auto a = getApiResult();
            auto b = getReferenceResult();s
        }
    }

    SECTION( "validation" ) {

        SECTION( "some way to mess it up" ) {

            REQUIRE_THROWS( someApiFunc(badArgs) );
        }
    }
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.