Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
p2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
cse332-21wi
p2
Commits
bc25293a
Commit
bc25293a
authored
5 years ago
by
Annie Mao
Browse files
Options
Downloads
Patches
Plain Diff
Added null check to find() call to prevent NullPointerException when running tests.
parent
00f004f1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tests/gitlab/ckpt2/AVLTreeTests.java
+1
-0
1 addition, 0 deletions
src/tests/gitlab/ckpt2/AVLTreeTests.java
with
1 addition
and
0 deletions
src/tests/gitlab/ckpt2/AVLTreeTests.java
+
1
−
0
View file @
bc25293a
...
...
@@ -139,6 +139,7 @@ public class AVLTreeTests extends TestsUtility {
// Check for accuracy
passed
&=
totalCount
==
(
n
*
(
n
+
1
))
/
2
*
5
;
passed
&=
tree
.
size
()
==
n
;
passed
&=
tree
.
find
(
"00851"
)
!=
null
;
passed
&=
tree
.
find
(
"00851"
)
==
4260
;
return
passed
?
1
:
0
;
...
...
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