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

Tests the functionality of the MutantStack class, compares it with std::list, and evaluates its performance. [詳解]

#include "MutantStack.hpp"
#include <iostream>
#include <list>
#include <vector>
main.cpp の依存先関係図:

[ソースコード]

関数

void subject_main_test ()
 Basic test cases specified in the assignment.
 
void list_comparison_test ()
 Test comparing MutantStack's behaviour with std::list.
 
void reverse_iterator_test ()
 Tests the behaviour of reverse iterators.
 
void performanceTest ()
 Test to compare performance using internal containers.
 
int main ()
 Program entry point.
 

詳解

Tests the functionality of the MutantStack class, compares it with std::list, and evaluates its performance.

This program executes the following four test functions.

  1. subject_main_test: Verifies the basic stack operations and iterator functionality of MutantStack.
  2. list_comparison_test: Performs the same operations on std::list to demonstrate similar behaviour.
  3. reverse_iterator_test: Verifies that reverse iterators function correctly.
  4. performanceTest: Compares the performance of push/pop operations when the internal container is changed to std::deque, std::vector, or std::list.

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

関数詳解

◆ list_comparison_test()

void list_comparison_test ( )

Test comparing MutantStack's behaviour with std::list.

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

◆ main()

int main ( )

Program entry point.

Executes each test case of the MutantStack class in order.

戻り値
Returns 0 when normal termination occurs.

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

◆ performanceTest()

void performanceTest ( )

Test to compare performance using internal containers.

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

◆ reverse_iterator_test()

void reverse_iterator_test ( )

Tests the behaviour of reverse iterators.

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

◆ subject_main_test()

void subject_main_test ( )

Basic test cases specified in the assignment.

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