Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XChart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
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
Brady James Garvin
XChart
Commits
8ceadc51
Commit
8ceadc51
authored
10 years ago
by
Hwaipy Li
Browse files
Options
Downloads
Patches
Plain Diff
add an UnitTest for Histogram
parent
1805ddbd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
xchart/src/test/java/com/xeiam/xchart/HistogramTest.java
+4
-4
4 additions, 4 deletions
xchart/src/test/java/com/xeiam/xchart/HistogramTest.java
with
4 additions
and
4 deletions
xchart/src/test/java/com/xeiam/xchart/HistogramTest.java
+
4
−
4
View file @
8ceadc51
...
@@ -16,9 +16,7 @@
...
@@ -16,9 +16,7 @@
package
com.xeiam.xchart
;
package
com.xeiam.xchart
;
import
static
org
.
fest
.
assertions
.
api
.
Assertions
.
assertThat
;
import
static
org
.
fest
.
assertions
.
api
.
Assertions
.
assertThat
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -39,8 +37,9 @@ public class HistogramTest {
...
@@ -39,8 +37,9 @@ public class HistogramTest {
// Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).build();
// Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).build();
// chart.addSeries("histogram 1", histogram.getxAxisData(), histogram.getyAxisData());
// chart.addSeries("histogram 1", histogram.getxAxisData(), histogram.getyAxisData());
// new SwingWrapper(chart).displayChart();
// new SwingWrapper(chart).displayChart();
}
}
@Test
@Test
public
void
testNegetiveValues
()
{
public
void
testNegetiveValues
()
{
Histogram
histogram
=
new
Histogram
(
Arrays
.
asList
(-
1
,
-
2
,
-
3
,
-
4
,
-
5
,
-
6
),
3
);
Histogram
histogram
=
new
Histogram
(
Arrays
.
asList
(-
1
,
-
2
,
-
3
,
-
4
,
-
5
,
-
6
),
3
);
...
@@ -49,4 +48,5 @@ public class HistogramTest {
...
@@ -49,4 +48,5 @@ public class HistogramTest {
assertThat
(
histogram
.
getMin
()).
isEqualTo
(-
6
);
assertThat
(
histogram
.
getMin
()).
isEqualTo
(-
6
);
assertThat
(
histogram
.
getNumBins
()).
isEqualTo
(
3
);
assertThat
(
histogram
.
getNumBins
()).
isEqualTo
(
3
);
}
}
}
}
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