Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Formula
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RADELLAH Badr
Formula
Commits
ae7810dd
Commit
ae7810dd
authored
1 year ago
by
LABOUREL Arnaud
Browse files
Options
Downloads
Patches
Plain Diff
added config files
parent
0f13cbd8
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
build.gradle
+7
-1
7 additions, 1 deletion
build.gradle
gradle.properties
+1
-0
1 addition, 0 deletions
gradle.properties
src/main/java/curve/App.java
+1
-0
1 addition, 0 deletions
src/main/java/curve/App.java
src/test/java/curve/CurveTest.java
+7
-8
7 additions, 8 deletions
src/test/java/curve/CurveTest.java
with
16 additions
and
9 deletions
build.gradle
+
7
−
1
View file @
ae7810dd
plugins
{
plugins
{
id
"java"
id
'application'
}
}
apply
plugin
:
"java"
group
'L3_INFO'
group
'L3_INFO'
version
'1.0-SNAPSHOT'
version
'1.0-SNAPSHOT'
...
@@ -19,3 +21,7 @@ test {
...
@@ -19,3 +21,7 @@ test {
useJUnitPlatform
()
useJUnitPlatform
()
}
}
application
{
mainClass
=
'curve.App'
}
This diff is collapsed.
Click to expand it.
gradle.properties
0 → 100644
+
1
−
0
View file @
ae7810dd
org.gradle.warning.mode
=
all
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/curve/App.java
+
1
−
0
View file @
ae7810dd
...
@@ -21,6 +21,7 @@ public class App {
...
@@ -21,6 +21,7 @@ public class App {
Runtime
runtime
=
Runtime
.
getRuntime
();
Runtime
runtime
=
Runtime
.
getRuntime
();
String
[]
arguments
=
{
"gnuplot"
,
"-persist"
};
String
[]
arguments
=
{
"gnuplot"
,
"-persist"
};
Process
process
=
runtime
.
exec
(
arguments
);
Process
process
=
runtime
.
exec
(
arguments
);
Writer
stream
=
new
OutputStreamWriter
(
process
.
getOutputStream
());
Writer
stream
=
new
OutputStreamWriter
(
process
.
getOutputStream
());
writeGnuplotInput
(
stream
,
curve
);
writeGnuplotInput
(
stream
,
curve
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/curve/CurveTest.java
+
7
−
8
View file @
ae7810dd
package
curve
;
package
curve
;
import
static
org
.
hamcrest
.
MatcherAssert
.
assertThat
;
import
static
org
.
hamcrest
.
Matchers
.*;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.StringWriter
;
import
java.io.StringWriter
;
import
java.io.Writer
;
import
java.io.Writer
;
import
org.junit.Test
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.*;
import
formula.Sum
;
import
formula.Sum
;
import
formula.Variable
;
import
formula.Variable
;
...
@@ -15,7 +14,7 @@ import formula.Variable;
...
@@ -15,7 +14,7 @@ import formula.Variable;
public
class
CurveTest
{
public
class
CurveTest
{
@Test
@Test
public
void
test
()
throws
IOException
{
void
test
()
throws
IOException
{
Variable
variable
=
new
Variable
(
"variable"
,
0
);
Variable
variable
=
new
Variable
(
"variable"
,
0
);
Function
function
=
new
Function
(
new
Sum
(
variable
,
variable
),
variable
);
Function
function
=
new
Function
(
new
Sum
(
variable
,
variable
),
variable
);
double
startValue
=
-
1
;
double
startValue
=
-
1
;
...
@@ -28,10 +27,10 @@ public class CurveTest {
...
@@ -28,10 +27,10 @@ public class CurveTest {
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
double
value
=
startValue
;
value
<=
endValue
;
value
+=
step
)
{
for
(
double
value
=
startValue
;
value
<=
endValue
;
value
+=
step
)
{
stringBuilder
.
append
(
value
+
" "
+
2
*
value
+
"\n"
);
stringBuilder
.
append
(
value
).
append
(
" "
).
append
(
2
*
value
).
append
(
"\n"
);
}
}
assertThat
(
writer
.
toString
()
,
e
qualTo
(
stringBuilder
.
toString
())
)
;
assertThat
(
writer
.
toString
()
).
isE
qualTo
(
stringBuilder
.
toString
());
}
}
}
}
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