Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Current
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bryce Hwang
Current
Commits
29da792d
Commit
29da792d
authored
10 months ago
by
Ari Trachtenberg
Browse files
Options
Downloads
Patches
Plain Diff
fixed lab0p4 testing error
parent
dae4d936
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
problems/LabZero_ChapterThree.h
+3
-3
3 additions, 3 deletions
problems/LabZero_ChapterThree.h
tests/LabZero.cpp
+2
-2
2 additions, 2 deletions
tests/LabZero.cpp
with
5 additions
and
5 deletions
problems/LabZero_ChapterThree.h
+
3
−
3
View file @
29da792d
...
...
@@ -17,7 +17,7 @@
void
labZero_pThree
();
/**
* @input read in four pairs of integral x y coordinates, one per line
.
* @input read in four pairs of integral x y coordinates, one per line
, in clock-wise order
* @output outputs the most specific description of the
* four points among the following choices:
* square, rectangle, trapezoid, rhombus, none of these
...
...
@@ -25,15 +25,15 @@ void labZero_pThree();
* @example 1
* 0 0
* 0 1
* 1 0
* 1 1
* 1 0
* square
*
* @example 2
* 0 0
* 0 1
* 2 0
* 1 1
* 2 0
* trapezoid
*/
void
labZero_pFour
();
...
...
This diff is collapsed.
Click to expand it.
tests/LabZero.cpp
+
2
−
2
View file @
29da792d
...
...
@@ -70,14 +70,14 @@ bool test_labZero_pFour() {
string
out
;
// example 1
Common
::
redirIO
(
"0 0
\n
0 1
\n
1
0
\n
1
1
\n
"
);
Common
::
redirIO
(
"0 0
\n
0 1
\n
1
1
\n
1
0
\n
"
);
labZero_pFour
();
out
=
Common
::
restoreIO
();
if
(
out
.
find
(
"square"
)
==
string
::
npos
)
return
false
;
// example 2
Common
::
redirIO
(
"0 0
\n
0 1
\n
2 0
\n
1 1
\n
"
);
Common
::
redirIO
(
"0 0
\n
0 1
\n
1 1
\n
2 0
\n
"
);
labZero_pFour
();
out
=
Common
::
restoreIO
();
if
(
out
.
find
(
"trapezoid"
)
==
string
::
npos
)
...
...
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