List of commits:
Subject Hash Author Date (UTC)
update asserter 207c280f9499e8b53e122bfddb2230acb5e0330d mucbuc 2020-06-27 16:07:41
asserter update 385f902736af73063cdfe26c17d85e9244eac82b mucbuc 2020-06-27 15:22:09
asserter update 390196551ae20bd734b441c32a4e20aded4e6394 mucbuc 2020-06-27 15:13:06
silent ab22b60ab194abcf99f9f215239434ef8a1d6121 Ubuntu 2020-04-06 04:38:32
rename 5359c6029c1080d29887e88127fb37f8918d8066 Ubuntu 2020-04-06 04:13:04
dont run if build fails 4986cf7e97d2019b61cae2970030ebb3c1a51168 Ubuntu 2020-04-05 23:10:42
test56 64c03cd6b03d61600e12a76c6ab623f7567b7ed8 Ubuntu 2020-04-01 05:11:28
test10 0596a0ef4052813eb8b2431096d5ff2f969f3ec9 Ubuntu 2020-04-01 05:03:21
test9 648cfb34e18d9ef6e8f9f33088b601aeeaed47b9 Ubuntu 2020-04-01 04:59:38
test8 c7d23043bad421e9ee06269567d97e3f894b58bb Ubuntu 2020-04-01 04:55:36
test6 cb9441b6be2b8175bd0d338decddb1eef82a15a6 Ubuntu 2020-04-01 04:52:26
test5] bcfbe9a0238a8ab5046211b9302f8fe71d1fc6af Ubuntu 2020-04-01 04:50:04
test4 01789d82fd44bb05952a4b0f51314b3d6005d4db Ubuntu 2020-04-01 04:31:30
test3 12f4cdd3d957d06a0810227df38e319e7e5aaa7e Ubuntu 2020-04-01 04:29:32
test2 25199a1879f59b73c3545817dcc38094c8794c3c Ubuntu 2020-04-01 04:06:40
test 71b0bb453140d43fe2019d98349ba9abe2e2b0b5 Ubuntu 2020-04-01 04:01:32
format 07fea6d901a0a1b39e113ed2eab2521bb84e4dcf Ubuntu 2020-03-31 04:36:04
yml support a0aca84f236cf2c0ac729030c3031999419530e2 Ubuntu 2020-03-30 19:20:30
prettier c0a36395356a8e6b165785b5e2dd5486fa22206d Ubuntu 2020-03-30 04:06:19
fix shit 4e786cec2b361164d67318fb9bc4d3e16b5e3156 Ubuntu 2020-03-30 02:55:58
Commit 207c280f9499e8b53e122bfddb2230acb5e0330d - update asserter
Author: mucbuc
Author date (UTC): 2020-06-27 16:07
Committer name: mucbuc
Committer date (UTC): 2020-06-27 16:07
Parent(s): 385f902736af73063cdfe26c17d85e9244eac82b
Signing key:
Tree: 6b1616a9b72b55607a77233568bbfc6b1585e054
File Lines added Lines deleted
asserter/src/asserter.cpp 15 8
asserter/src/asserter.h 5 3
asserter/src/asserter.hxx 1 1
asserter/test/src/check_assert.cpp 0 1
File asserter/src/asserter.cpp changed (mode: 100644) (index fb5c2e1..379f1e5)
... ... asserter_t::asserter_t(bool value)
19 19 , m_value(value) , m_value(value)
20 20 { {
21 21 } }
22 /////////////////////////////////////////////////////////////////////////////////////////////
23 const char* asserter_t::code_red()
24 {
25 return "\x1b[31m";
26 }
27
28 /////////////////////////////////////////////////////////////////////////////////////////////
29 const char* asserter_t::code_reset()
30 {
31 return "\x1b[39;49m";
32 }
22 33
23 34 ///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
24 35 bool asserter_t::pass() const bool asserter_t::pass() const
 
... ... const asserter_t& asserter_t::print_message(
33 44 const char* function, const char* function,
34 45 const char* message) const const char* message) const
35 46 { {
36 static const char* code_red("\x1b[31m");
37 static const char* code_reset("\x1b[39;49m");
38
39 47 using namespace std; using namespace std;
40 48
41 49 if (!pass()) { if (!pass()) {
42 cout << code_red
43 << "assertion failed: " << message << endl
44 << "file: " << file << endl
45 << "line: " << line << endl
50 cout << code_red()
51 << file << ":" << line << ": "
52 << "assert failed: " << message << endl
46 53 << "function: " << function << "function: " << function
47 << code_reset << endl;
54 << code_reset() << endl;
48 55 } }
49 56 return *this; return *this;
50 57 } }
File asserter/src/asserter.h changed (mode: 100644) (index 0f8a8de..74d8f2a)
20 20 } local_obj = asserter_t(false) } local_obj = asserter_t(false)
21 21
22 22 // asserter_t // asserter_t
23 class asserter_t {
24 public:
23 struct asserter_t {
25 24 template <class T> template <class T>
26 25 const asserter_t operator()(const T&) const { return asserter_t(); } const asserter_t operator()(const T&) const { return asserter_t(); }
27 26 }; };
 
... ... struct asserter_t final {
76 75 asserter_t& SMART_ASSERT_B; asserter_t& SMART_ASSERT_B;
77 76
78 77 private: private:
78 static const char* code_red();
79 static const char* code_reset();
80
79 81 const bool m_value; const bool m_value;
80 82 }; };
81 83
 
... ... private:
83 85
84 86 #endif // NDEBUG #endif // NDEBUG
85 87
86 #endif // ASSERT_H_9879879hkjh
88 #endif // ASSERT_H_9879879hkjh
File asserter/src/asserter.hxx changed (mode: 100644) (index 3ad5288..d4a63da)
... ... template <class U>
5 5 const asserter_t& asserter_t::print_current_val(const U& value, const char* message) const const asserter_t& asserter_t::print_current_val(const U& value, const char* message) const
6 6 { {
7 7 if (!pass()) { if (!pass()) {
8 std::cout << message << ": " << value << std::endl;
8 std::cout << code_red() << message << ": " << value << code_reset() << std::endl;
9 9 } }
10 10 return *this; return *this;
11 11 } }
File asserter/test/src/check_assert.cpp changed (mode: 100644) (index d9ab4da..0e96a35)
... ... int main(int argc, const char* argv[])
10 10
11 11 ASSERT(!a.empty()) ASSERT(!a.empty())
12 12 (a)(a.size()); (a)(a.size());
13
14 13 return 0; return 0;
15 14 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/ccargs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/ccargs

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/ccargs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main