source: mainline/uspace/app/cpptest/main.cpp@ b48e680f

serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since b48e680f was 8e24583, checked in by Jaroslav Jindrak <dzejrou@…>, 6 years ago

cpp: write tests for <future> and fix minor bugs they found

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*
2 * Copyright (c) 2018 Jaroslav Jindrak
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <__bits/test/tests.hpp>
30
31/* using namespace std::chrono_literals; */
32
33#include <cassert>
34#include <cctype>
35#include <cerrno>
36#include <cinttypes>
37#include <climits>
38#include <csetjmp>
39#include <cstdarg>
40#include <cstddef>
41#include <cstdint>
42#include <cstdio>
43#include <cstdlib>
44#include <cstring>
45#include <ctime>
46#include <cwchar>
47
48#include <algorithm>
49#include <array>
50#include <chrono>
51#include <condition_variable>
52#include <deque>
53#include <exception>
54#include <fstream>
55#include <functional>
56#include <initializer_list>
57#include <ios>
58#include <iosfwd>
59#include <iostream>
60#include <istream>
61#include <iterator>
62#include <limits>
63#include <list>
64#include <locale>
65#include <memory>
66#include <mutex>
67#include <new>
68#include <numeric>
69#include <ostream>
70#include <ratio>
71#include <sstream>
72#include <stack>
73#include <streambuf>
74#include <string>
75#include <system_error>
76#include <thread>
77#include <tuple>
78#include <type_traits>
79#include <typeindex>
80#include <typeinfo>
81#include <utility>
82#include <vector>
83#include <unordered_map>
84#include <unordered_set>
85#include <queue>
86#include <set>
87#include <map>
88#include <bitset>
89#include <random>
90#include <iomanip>
91#include <system_error>
92#include <stdexcept>
93#include <complex>
94#include <future>
95#include <shared_mutex>
96
97#include <__bits/adt/hash_table.hpp>
98#include <__bits/adt/rbtree.hpp>
99#include <__bits/builtins.hpp>
100
101#include <__bits/trycatch.hpp>
102
103int main()
104{
105 std::test::test_set ts{};
106 ts.add<std::test::vector_test>();
107 ts.add<std::test::string_test>();
108 ts.add<std::test::array_test>();
109 ts.add<std::test::bitset_test>();
110 ts.add<std::test::deque_test>();
111 ts.add<std::test::tuple_test>();
112 ts.add<std::test::map_test>();
113 ts.add<std::test::set_test>();
114 ts.add<std::test::unordered_map_test>();
115 ts.add<std::test::unordered_set_test>();
116 ts.add<std::test::numeric_test>();
117 ts.add<std::test::adaptors_test>();
118 ts.add<std::test::memory_test>();
119 ts.add<std::test::list_test>();
120 ts.add<std::test::ratio_test>();
121 ts.add<std::test::functional_test>();
122 ts.add<std::test::algorithm_test>();
123 ts.add<std::test::future_test>();
124
125 return ts.run(true) ? 0 : 1;
126}
Note: See TracBrowser for help on using the repository browser.