-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from uqbar-project/fix-#182-failing-tests
Fix #182 failing tests
- Loading branch information
Showing
16 changed files
with
166 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
wollok-ts: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
wget -O wollok-ts-cli https://github.com/uqbar-project/wollok-ts-cli/releases/latest/download/wollok-ts-cli-linux-x64 | ||
chmod a+x ./wollok-ts-cli | ||
./wollok-ts-cli test --skipValidations -p ./ | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
## example | ||
|
||
TODO | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
object pepita { | ||
var energy = 100 | ||
|
||
method energy() = energy | ||
|
||
method eat(grams) { | ||
energy = energy + grams * 10 | ||
} | ||
|
||
method fly(minutes) { | ||
energy = energy - minutes * 3 | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import example.pepita | ||
|
||
program PepitaProgram { | ||
|
||
pepita.fly(10) | ||
console.println("Pepita empieza con " + pepita.energy()) | ||
console.println("Vuela") | ||
pepita.fly(10) | ||
console.println(pepita.energy()) | ||
console.println("Come") | ||
pepita.eat(25) | ||
console.println(pepita.energy()) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
object pepita { | ||
var energy = 100 | ||
var nombre = "Pepita" | ||
var property image = "pepita.png" | ||
var property position = new MutablePosition(x = 0, y = 1) | ||
var height = 10 | ||
var width = 10 | ||
|
||
method energy() = energy | ||
|
||
method eat(grams) { | ||
energy = energy + grams * 10 | ||
} | ||
|
||
method fly(minutes) { | ||
energy = energy - minutes * 3 | ||
} | ||
|
||
} | ||
|
||
program PepitaGame { | ||
game.addVisualCharacter(pepita) | ||
|
||
// Stop on connection (from any client) | ||
game.onTick(0, "end", { | ||
console.println("finishing...") | ||
game.stop() | ||
}) | ||
|
||
console.println("starting...") | ||
game.start() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "existing-folder", | ||
"version": "1.0.0", | ||
"resourceFolder": "specialAssets", | ||
"wollokVersion": "4.0.0", | ||
"author": "dodain", | ||
"license": "ISC" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import example.pepita | ||
|
||
describe "group of tests for pepita" { | ||
|
||
test "pepita has initial energy" { | ||
assert.equals(100, pepita.energy()) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters