CPP08 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
main.cpp ファイル

Tests the functionality, robustness, and performance of the Span class. [詳解]

#include "Span.hpp"
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <vector>
main.cpp の依存先関係図:

[ソースコード]

関数

void subject_test ()
 Basic test cases specified in the assignment.
 
void large_test ()
 Test for handling large amounts of numerical data.
 
void exception_test ()
 Test whether exceptions are thrown correctly.
 
int main ()
 Program entry point.
 

詳解

Tests the functionality, robustness, and performance of the Span class.

This program executes the following three main test functions.

  1. subject_test: Verifies the basic operations (shortestSpan, longestSpan) required by the assignment.
  2. large_test: Verifies performance and behaviour when a large number of elements (15,000) are added.
  3. exception_test: Verifies that exceptions are correctly thrown when the Span is full or when elements are insufficient.

main.cpp に定義があります。

関数詳解

◆ exception_test()

void exception_test ( )

Test whether exceptions are thrown correctly.

main.cpp79 行目に定義があります。

◆ large_test()

void large_test ( )

Test for handling large amounts of numerical data.

main.cpp51 行目に定義があります。

◆ main()

int main ( )

Program entry point.

Executes each test case of the Span class in order.

戻り値
Returns 0 when normal termination occurs.

main.cpp119 行目に定義があります。

◆ subject_test()

void subject_test ( )

Basic test cases specified in the assignment.

main.cpp33 行目に定義があります。