Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
fdffcc1d
Commit
fdffcc1d
authored
6 years ago
by
Theodoros Katzalis
Browse files
Options
Downloads
Patches
Plain Diff
Added tests for the constructor
parent
cfe5537f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/Helpers/TimeAndDate.cpp
+10
-1
10 additions, 1 deletion
test/Helpers/TimeAndDate.cpp
with
10 additions
and
1 deletion
test/Helpers/TimeAndDate.cpp
+
10
−
1
View file @
fdffcc1d
...
@@ -4,6 +4,15 @@
...
@@ -4,6 +4,15 @@
TEST_CASE
(
"Date comparison"
,
"[operands]"
)
{
TEST_CASE
(
"Date comparison"
,
"[operands]"
)
{
SECTION
(
"Invalid date"
)
{
TimeAndDate
InvalidDate0
(
1900
,
2
,
2
,
4
,
5
,
6
);
// error in year
TimeAndDate
InvalidDate1
(
2030
,
70
,
2
,
4
,
5
,
6
);
// error in month
TimeAndDate
InvalidDate2
(
2030
,
2
,
73
,
4
,
5
,
6
);
// error in day
TimeAndDate
InvalidDate3
(
2030
,
2
,
2
,
74
,
5
,
6
);
// error in hour
TimeAndDate
InvalidDate4
(
2030
,
2
,
2
,
4
,
75
,
6
);
// error in minute
TimeAndDate
InvalidDate5
(
2030
,
2
,
2
,
4
,
5
,
76
);
// error in seconds
}
SECTION
(
"Different year"
)
{
SECTION
(
"Different year"
)
{
TimeAndDate
Now
;
TimeAndDate
Now
;
// 10/04/2021 10:15:00
// 10/04/2021 10:15:00
...
@@ -197,7 +206,7 @@ TEST_CASE("Date comparison", "[operands]") {
...
@@ -197,7 +206,7 @@ TEST_CASE("Date comparison", "[operands]") {
CHECK
((
Now
==
Date
)
==
false
);
CHECK
((
Now
==
Date
)
==
false
);
}
}
SECTION
(
"Same date"
){
SECTION
(
"Same date"
)
{
TimeAndDate
Now
;
TimeAndDate
Now
;
// 10/04/2020 10:15:01
// 10/04/2020 10:15:01
Now
.
year
=
2020
;
Now
.
year
=
2020
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment