Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
clamped_arithmetic_test.cpp File Reference

Tests for shared helpers in clamped_arithmetic.h. More...

#include <gtest/gtest.h>
#include <libcockatrice/utility/clamped_arithmetic.h>
#include <limits>
Include dependency graph for clamped_arithmetic_test.cpp:

Functions

 TEST (AddClamped, AddsWithinBounds)
 TEST (AddClamped, ClampsToUpperAndLowerBound)
 TEST (AddClamped, IntOverflowDoesNotWrap)
 TEST (AddClamped, IntUnderflowDoesNotWrap)
int main (int argc, char **argv)

Detailed Description

Tests for shared helpers in clamped_arithmetic.h.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

◆ TEST() [1/4]

TEST ( AddClamped ,
AddsWithinBounds  )
Here is the call graph for this function:

◆ TEST() [2/4]

TEST ( AddClamped ,
ClampsToUpperAndLowerBound  )
Here is the call graph for this function:

◆ TEST() [3/4]

TEST ( AddClamped ,
IntOverflowDoesNotWrap  )
Here is the call graph for this function:

◆ TEST() [4/4]

TEST ( AddClamped ,
IntUnderflowDoesNotWrap  )
Here is the call graph for this function: