aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/option.cc8
-rw-r--r--test/timer.cc4
2 files changed, 6 insertions, 6 deletions
diff --git a/test/option.cc b/test/option.cc
index 30b2406..cf80374 100644
--- a/test/option.cc
+++ b/test/option.cc
@@ -32,11 +32,11 @@ int main() {
};
{
- option<int> o1;
- option<int> o2{::option::none{}};
+ const option<int> kO1{};
+ const option<int> kO2{::option::none{}};
- assert(!o1.has_value());
- assert(!o2.has_value());
+ assert(!kO1.has_value());
+ assert(!kO2.has_value());
}
// Assume we start test with cnt=0.
diff --git a/test/timer.cc b/test/timer.cc
index 6bc783c..5ac169c 100644
--- a/test/timer.cc
+++ b/test/timer.cc
@@ -12,14 +12,14 @@ int main() {
{
puts("Sleep 100ms");
- timer::scoped_timer s{t};
+ const timer::scoped_timer kS{t};
usleep(100 * 1000);
}
kShowTime();
{
puts("Sleep 500ms");
- timer::scoped_timer s{t};
+ const timer::scoped_timer kS{t};
usleep(500 * 1000);
}
kShowTime();