Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

Fixed extension test skipping #31

Merged
merged 2 commits into from
Nov 22, 2017
Merged

Conversation

timoti111
Copy link
Collaborator

@timoti111 timoti111 commented Nov 21, 2017

  • when section had global extension need in tests.json and test was in file and was not defined in tests.json test was not skipped
  • asc() test can now be run without FUNEXP extension
  • chr() test can now be run without FUNEXP extension
  • tests 09/04 and 09/14 need IFTHEN extension

- when section had global extension need in tests.json and test was in file and was not defined in tests.json test was not skipped
@@ -14,13 +14,13 @@
},
{
"info": "Asc value",
"stdout": " 104",
"code": "scope \n print asc(!\"ahoj\", 2); \n end scope"
"stdout": " 111",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Není pravda, zadej si na https://www.jdoodle.com/execute-freebasic-online

/' Zajisteni zakladni kompatibility IFJ17->FreeBASIC '/

Function Length(s As String) As Integer
Return Len(s)
End Function

Function SubStr(s as String, i As Integer, n As Integer) As String
Return Mid(s, i, n)
End Function

/' Zde bude nasledovat program jazyka IFJ17 '/

scope
print asc (!"ahoj", 2);
end scope

Výstup bude 104

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bral som to zo zadania tak že druhý parameter znamená index v poli charov ale je pravda že v tomto prípade to dáva oveľa väčší zmysel keď je to brané ako pozícia v stringu. Opravené.

"stdout": " 104",
"code": "scope \n print asc(!\"ahoj\", 2); \n end scope"
"stdout": " 111",
"code": "scope \n dim a as integer = asc(!\"ahoj\", 2) \n print a; \n end scope"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Není v základním zadání volání funkce povoleno pouze jako id = funkce(seznam_parametrů) ?

Ano moje zadání neodpovídalo ale řekl bych že tvé také ne. Mohu se mýlit.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Souhlas s @martinkobelka, musí tam být samostatné přiřazení.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Áno to je pravda. Opravené.

},
{
"info": "Chr function",
"stdout": "a",
"code": "scope \n print chr(97); \n end scope"
"code": "scope \n dim s as string = chr(97) \n print s; \n end scope"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stejný problém jako výše?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opravené.

Copy link
Owner

@thejoeejoee thejoeejoee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zatím nemohu vzít, některá očekávání v testech jsou chybná, viz komentáře.

@timoti111 timoti111 force-pushed the master branch 2 times, most recently from 0e4a317 to 05fd086 Compare November 22, 2017 08:14
- removed need of FUNEXP extension on asc() and chr() tests
- tests 05/04 and 05/14 needs IFTHEN extension
@thejoeejoee thejoeejoee merged commit e3002ce into thejoeejoee:master Nov 22, 2017
@thejoeejoee
Copy link
Owner

Díky @timoti111.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants