Unverified Commit 0ac4368d authored by Stefan Brunecker's avatar Stefan Brunecker Committed by GitHub
Browse files

Merge pull request #7 from EmbeddedMontiArc/release-0.0.9

Release 0.0.9
parents 3118aff7 5bde0a37
......@@ -26,10 +26,10 @@ jobs:
services:
- docker
script:
- mvn verify -Pintegration-test jacoco:report coveralls:report --settings "settings.xml"
- mvn verify -Pintegration-test jacoco:report --settings "settings.xml"
- stage: acceptance-test
script:
- mvn verify -Pacceptance-test jacoco:report coveralls:report --settings "settings.xml"
- mvn verify -Pacceptance-test jacoco:report --settings "settings.xml"
after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
......
......@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.monticore.lang.montiarc</groupId>
<artifactId>demonstrator</artifactId>
<version>0.0.8</version>
<artifactId>emam2wasm</artifactId>
<version>0.0.9</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
......@@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
public class JsGeneratorIT {
class JsGeneratorIT {
private static final Path RESSOURCE_DIR = Paths
.get("src/integration-test/resources/jsfilegeneration");
......@@ -52,7 +52,7 @@ public class JsGeneratorIT {
@ParameterizedTest
@ValueSource(strings = {
"noPorts", "caretSymbol",
"noPorts", "caretSymbol", "thousandsDimension",
"scalar_NoRangeNoUnit", "scalar_RangeNoUnit", "scalar_RangeUnit",
"array_NoRangeNoUnit", "array_RangeNoUnit", "array_RangeUnit",
"rowVector_NoRangeNoUnit", "rowVector_RangeNoUnit", "rowVector_RangeUnit",
......
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outArray").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInArray(document.getElementById("inport-field-inArray").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inArray").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outArray").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outMatrix").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInMatrix(document.getElementById("inport-field-inMatrix").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inMatrix").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outMatrix").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -143,8 +168,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -152,9 +182,8 @@
<script>
function exec() {
document.getElementById("outport-field-v").innerText = "";
document.getElementById("outport-field-k").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setM1(document.getElementById("inport-field-m1").value);
......@@ -175,6 +204,28 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-m1").value = "";
document.getElementById("inport-field-m2").value = "";
document.getElementById("inport-field-c").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-v").innerText = "";
document.getElementById("outport-field-k").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -82,8 +107,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -91,7 +121,8 @@
<script>
function exec() {
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
......@@ -107,6 +138,23 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
}
function clearOutportFields() {
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -50,9 +50,34 @@
min-width: 200px;
}
.execute {
width: fit-content;
margin: 10px auto;
.buttons {
display: flex;
flex-direction: row;
margin: 10px;
}
.buttons div {
flex-basis: 100%;
}
.button {
color: white;
padding: 10px 16px;
border: none;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
width: 100px;
flex-basis: 100%;
}
#reset {
background-color: #d22b23;
}
#execute {
background-color: #24d231;
}
.error {
......@@ -106,8 +131,13 @@
</div>
</div>
</div>
<div class="execute">
<button id="execute" onclick="exec()">Execute</button>
<div class="buttons">
<div class="reset">
<button class="button" id="reset" onclick="reset()">Reset</button>
</div>
<div class="execute">
<button class="button" id="execute" onclick="exec()">Execute</button>
</div>
</div>
</div>
<div class="error" id="error"></div>
......@@ -115,8 +145,8 @@
<script>
function exec() {
document.getElementById("outport-field-outScalar").innerText = "";
document.getElementById("error").innerHTML = "";
clearOutportFields();
clearErrors();
try {
setInScalar(document.getElementById("inport-field-inScalar").value);
......@@ -134,6 +164,25 @@
}
}
}
function reset() {
init();
clearInportFields();
clearOutportFields();
clearErrors();
}
function clearInportFields() {
document.getElementById("inport-field-inScalar").value = "";
}
function clearOutportFields() {
document.getElementById("outport-field-outScalar").innerText = "";
}
function clearErrors() {
document.getElementById("error").innerHTML = "";
}
</script>
</body>
</html>
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......@@ -33,13 +37,10 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
var array = [];
for (var i0 = 0; i0 < 4; i0++) {
var e = value.get([i0]);
//check unit
var e_num = e.toSI().toNumber();
//check range
array [i0] = e_num;
var e_num = e;
array[i0] = e_num;
}
Module.setInNoRangeNoUnit(array);
}
......@@ -10,19 +10,22 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
function getOutRangeNoUnit() {
return math.format(Module.getOutRangeNoUnit(), {notation: 'fixed'})
;
return math.format(Module.getOutRangeNoUnit(), {notation: 'fixed'});
}
function setInRangeNoUnit(_inRangeNoUnit) {
var value = math.eval(_inRangeNoUnit);
var lower = math.eval("-10/1").toSI().toNumber();
var upper = math.eval("10/1").toSI().toNumber();
var lower = -10 / 1;
var upper = 10 / 1;
if (value === undefined) {
throw "Could not evaluate input for _inRangeNoUnit";
......@@ -36,11 +39,9 @@ function setInRangeNoUnit(_inRangeNoUnit) {
var array = [];
for (var i0 = 0; i0 < 4; i0++) {
var e = value.get([i0]);
//check unit
var e_num = e.toSI().toNumber();
var e_num = e;
//check range
if (math.smaller(e_num, lower)) {
throw "Value " + e_num + " out of range";
......
......@@ -10,6 +10,10 @@ var Module = {
}
};
function init() {
Module.init();
}
function execute() {
Module.execute();
}
......@@ -35,7 +39,6 @@ function setInRangeUnit(_inRangeUnit) {
var array = [];
for (var i0 = 0; i0 < 4; i0++) {
var e = value.get([i0]);
//check unit
......