@micro-os-plus/micro-test-plus 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,8 +84,18 @@ namespace micro_os_plus::micro_test_plus
84
84
  *this << " ";
85
85
  }
86
86
  *this << colors_.fail << "FAILED" << colors_.none;
87
+ #pragma GCC diagnostic push
88
+ #if defined(__clang__)
89
+ #pragma clang diagnostic ignored "-Wsign-conversion"
90
+ #elif defined(__GNUC__)
91
+ #pragma GCC diagnostic ignored "-Wnarrowing"
92
+ #pragma GCC diagnostic ignored "-Wsign-conversion"
93
+ #endif
87
94
  *this << " (" << reflection::short_name (location.file_name ()) << ":"
88
- << type_traits::genuine_integral_value<int>{ location.line () };
95
+ << type_traits::genuine_integral_value<unsigned int>{
96
+ location.line ()
97
+ };
98
+ #pragma GCC diagnostic pop
89
99
  }
90
100
 
91
101
  void
@@ -31,6 +31,7 @@
31
31
  #if defined(__clang__)
32
32
  #pragma clang diagnostic ignored "-Wc++98-compat"
33
33
  #pragma clang diagnostic ignored "-Wc++98-c++11-c++14-compat"
34
+ #pragma clang diagnostic ignored "-Wunknown-warning-option"
34
35
  #endif
35
36
 
36
37
  namespace micro_os_plus::micro_test_plus
@@ -44,6 +45,10 @@ namespace micro_os_plus::micro_test_plus
44
45
  #endif // MICRO_TEST_PLUS_TRACE
45
46
  }
46
47
 
48
+ #pragma GCC diagnostic push
49
+ #if defined(__clang__)
50
+ #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
51
+ #endif
47
52
  void
48
53
  test_runner::initialize (int argc, char* argv[], const char* name)
49
54
  {
@@ -56,7 +61,7 @@ namespace micro_os_plus::micro_test_plus
56
61
 
57
62
  default_suite_name_ = name;
58
63
 
59
- #if !defined(MICRO_OS_PLUS_INCLUDE_STARTUP)
64
+ #if !(defined(MICRO_OS_PLUS_INCLUDE_STARTUP) && defined(MICRO_OS_PLUS_TRACE))
60
65
  #if defined(MICRO_OS_PLUS_DEBUG)
61
66
  printf ("argv[");
62
67
  for (int i = 0; i < argc; ++i)
@@ -93,7 +98,7 @@ namespace micro_os_plus::micro_test_plus
93
98
 
94
99
  // ------------------------------------------------------------------------
95
100
 
96
- #if !defined(MICRO_OS_PLUS_INCLUDE_STARTUP)
101
+ #if !(defined(MICRO_OS_PLUS_INCLUDE_STARTUP) && defined(MICRO_OS_PLUS_TRACE))
97
102
  if (verbosity == verbosity::normal || verbosity == verbosity::verbose)
98
103
  {
99
104
  #if defined(__clang__)
@@ -106,7 +111,8 @@ namespace micro_os_plus::micro_test_plus
106
111
  #else
107
112
  printf ("Built with an unknown compiler");
108
113
  #endif
109
- #if !(defined(__APPLE__) || defined(__linux__) || defined(__unix__) || defined(WIN32))
114
+ #if !(defined(__APPLE__) || defined(__linux__) || defined(__unix__) \
115
+ || defined(WIN32))
110
116
  // This is relevant only on bare-metal.
111
117
  #if defined(__ARM_PCS_VFP) || defined(__ARM_FP)
112
118
  printf (", with FP");
@@ -135,6 +141,7 @@ namespace micro_os_plus::micro_test_plus
135
141
  // initialisations to display their messages.
136
142
  // default_test_suite_->begin_test_suite ();
137
143
  }
144
+ #pragma GCC diagnostic pop
138
145
 
139
146
  int
140
147
  test_runner::exit_code (void)
@@ -155,7 +162,7 @@ namespace micro_os_plus::micro_test_plus
155
162
 
156
163
  suite->begin_test_suite ();
157
164
  suite->run ();
158
- suite->end_test_suite();
165
+ suite->end_test_suite ();
159
166
 
160
167
  was_successful &= suite->was_successful ();
161
168
  }