Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-21wi
project07
Commits
5381bc82
Commit
5381bc82
authored
4 years ago
by
Ethan Ordentlich
Browse files
Options
Download
Email Patches
Plain Diff
Changes
parent
22e5096a
Pipeline
#47111
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/edu/caltech/cs2/datastructures/BeaverMapsGraph.java
+2
-4
src/edu/caltech/cs2/datastructures/BeaverMapsGraph.java
tests/edu/caltech/cs2/project07/BeavermapTests.java
+1
-1
tests/edu/caltech/cs2/project07/BeavermapTests.java
tests/edu/caltech/cs2/project07/GraphTests.java
+1
-1
tests/edu/caltech/cs2/project07/GraphTests.java
with
4 additions
and
6 deletions
+4
-6
src/edu/caltech/cs2/datastructures/BeaverMapsGraph.java
View file @
5381bc82
...
...
@@ -113,10 +113,8 @@ public class BeaverMapsGraph extends Graph<Long, Double> {
* @return the JSON data from filename
*/
private
static
JsonElement
fromFile
(
String
filename
)
{
// try (FileReader reader = new FileReader(filename)) {
// return JsonParser.parseReader(reader);
try
{
return
JSON_PARSER
.
parse
(
new
FileReader
(
filename
));
try
(
FileReader
reader
=
new
FileReader
(
filename
))
{
return
JsonParser
.
parseReader
(
reader
);
}
catch
(
IOException
e
)
{
return
null
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/edu/caltech/cs2/project07/BeavermapTests.java
View file @
5381bc82
...
...
@@ -32,7 +32,7 @@ import static org.junit.jupiter.api.Assertions.*;
@TestMethodOrder
(
MethodOrderer
.
OrderAnnotation
.
class
)
public
class
BeavermapTests
{
private
static
String
BEAVERMAP_GRAPH_SOURCE
=
"src/edu/caltech/cs2/
edu.caltech.cs2.
datastructures/BeaverMapsGraph.java"
;
private
static
String
BEAVERMAP_GRAPH_SOURCE
=
"src/edu/caltech/cs2/datastructures/BeaverMapsGraph.java"
;
private
static
JsonElement
fromFile
(
String
filename
)
{
try
(
FileReader
reader
=
new
FileReader
(
filename
))
{
...
...
This diff is collapsed.
Click to expand it.
tests/edu/caltech/cs2/project07/GraphTests.java
View file @
5381bc82
...
...
@@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.*;
@Tag
(
"C"
)
@TestMethodOrder
(
MethodOrderer
.
OrderAnnotation
.
class
)
public
class
GraphTests
{
private
static
final
String
GRAPH_SOURCE
=
"src/edu/caltech/cs2/
edu.caltech.cs2.
datastructures/Graph.java"
;
private
static
final
String
GRAPH_SOURCE
=
"src/edu/caltech/cs2/datastructures/Graph.java"
;
private
static
final
int
SIMPLE_OP_TIMEOUT_MS
=
300
;
private
static
final
int
MEDIUM_OP_TIMEOUT_MS
=
500
;
private
static
final
int
STRESS_OP_TIMEOUT_MS
=
2200
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment