Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
primes.cc File Reference

Tests for Primes. More...

#include <gtest/gtest.h>
#include <primes.H>
#include <algorithm>
#include <limits>
#include <stdexcept>
Include dependency graph for primes.cc:

Go to the source code of this file.

Functions

 TEST (Prime, test_prime)
 
 TEST (Prime, list)
 
 TEST (Prime, database)
 
 TEST (Prime, next_prime_semantics)
 
 TEST (Prime, next_prime_takes_the_first_prime_of_the_database)
 
 TEST (Prime, next_prime_above_the_database_is_the_smallest_prime_not_below_n)
 
 TEST (Prime, next_prime_number_greater_than_gives_the_smallest_prime_above_n)
 

Detailed Description

Tests for Primes.

Definition in file primes.cc.

Function Documentation

◆ TEST() [1/7]

TEST ( Prime  ,
database   
)

Definition at line 77 of file primes.cc.

References Primes::check_primes_database().

◆ TEST() [2/7]

TEST ( Prime  ,
list   
)

Definition at line 68 of file primes.cc.

References Primes::is_prime(), Primes::numPrimes, and Primes::primeList.

◆ TEST() [3/7]

TEST ( Prime  ,
next_prime_above_the_database_is_the_smallest_prime_not_below_n   
)

◆ TEST() [4/7]

TEST ( Prime  ,
next_prime_number_greater_than_gives_the_smallest_prime_above_n   
)

Definition at line 132 of file primes.cc.

References Primes::is_prime(), max(), and Primes::next_prime_number_greater_than().

◆ TEST() [5/7]

TEST ( Prime  ,
next_prime_semantics   
)

◆ TEST() [6/7]

TEST ( Prime  ,
next_prime_takes_the_first_prime_of_the_database   
)

Definition at line 104 of file primes.cc.

References Primes::next_prime(), Primes::numPrimes, and Primes::primeList.

◆ TEST() [7/7]

TEST ( Prime  ,
test_prime   
)

Definition at line 51 of file primes.cc.

References Primes::is_prime().