Ela Platform release 2016.4

47 views
Skip to first unread message

vorov2

unread,
Sep 7, 2016, 4:13:44 AM9/7/16
to elalang

Ela Platform 2016.3 is an iterative release that contains an important bug to Ela runtime environment (a related issue in a bug tracker is #1763) and several enhancements to the standard library.


What's new in this release:

http://elalang.net/docs/Article.aspx?p=whatsnew.htm


Download:

https://ela.codeplex.com/releases/view/626121

Tikhonov Alexey

unread,
Sep 22, 2016, 11:41:25 PM9/22/16
to ela...@googlegroups.com
Hi, Vasily!
 
Why is ela not happy with the code below? It says that "'length' is not implemented for the given argument list. Expected '?', got 'Fun'."
 
///////////////////////////////////////////
open test unsafe.console 
 
char x = x
 
fun1 {eqt} = let pattern = char
                str = "a"
                res = pattern str
             in eq str res
 
_ = [] 
    |> regFun fun1
    |> run
    |> report (\_ -> true) writen
///////////////////////////////////////////
 
Could you please add a unittest example into the Elide samples in the future?
 
Alexey


07.09.2016, 14:13, "vorov2" <ba...@voronkov.name>:
--

---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Best regards!
 
Alexey Tikhonov

vorov2

unread,
Sep 23, 2016, 3:23:11 AM9/23/16
to elalang, a.le...@ya.ru
I am afraid there is a bug with "regFun" function; "regFuns" works, but obviously not this one. In order to fix it you can replace "regFun" from "test" module with the following implementation:

regFun fun xs = funData asmMainModule fun :: xs

This fix will be included in the next release.

You can also use "espec" module which offers a more interesting approach to unit tests:
It is also better documented as long as "test" module is currently somewhat outdated and is mostly used internally (but not the "regFun" function unfortunately :).

With "espec" your code sample would look like so:

open espec

char x = x

test1
=
    test
"Simple test"
    given
"a"
     
when char
      should be
"a"

[]
 
|> addTest test1
 
|> run
 
|> formatResult

Executing it would produce the following output:

Test session started.
Test "Simple test" (failed 0, errors 0):
  given "a"
    when char -> "a"
    should be "a" -> success
Total tests:1 Failed: 0


On Friday, September 23, 2016 at 6:41:25 AM UTC+3, Tikhonov Alexey wrote:
Hi, Vasily!
 
Why is ela not happy with the code below? It says that "'leng' is not implemented for the given argument list. Expected '?', got 'Fun'."
 
///////////////////////////////////////////
open test unsafe.console 
 
char x = x
 
fun1 {eqt} = let pattern = char
                str = "a"
                res = pattern str
             in eq str res
 
_ = [] 
    |> regFun fun1
    |> run
    |> report (\_ -> true) writen
///////////////////////////////////////////
 
Could you please add a unittest example into the Elide samples in the future?
 
Alexey


07.09.2016, 14:13, "vorov2" <ba...@voronkov.name>:

Ela Platform 2016.3 is an iterative release that contains an important bug to Ela runtime environment (a related issue in a bug tracker is #1763) and several enhancements to the standard library.


What's new in this release:

http://elalang.net/docs/Article.aspx?p=whatsnew.htm


Download:

https://ela.codeplex.com/releases/view/626121

--

---
You received this message because you are subscribed to the Google Groups "elalang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elalang+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages