Re: [Vala] Testing framework

2016-02-01 Thread Chris Daley
Hi Steven,

It's still very much active, I've just had to take some time out to do some
work on my night job (managing a Rock band). I'm drafting a blog post this
afternoon with an update on progress and some new ways to contribute, so
stay tuned.

Cheers
Chris D



2016-02-01 14:22 GMT-08:00 Steven Oliver :

> Hey,
> I just wanted to drop in and see if any progress had been made on this?
>
> I for one am very excited about the possibility.
>
> Thank you,
> Steven N. Oliver
>
>
>
> On Fri, Jan 8, 2016 at 2:55 PM -0800, "Chris Daley" 
> wrote:
>
> Hi Al,
>>
>> Thanks for the input, this is very much appreciated and incredibly useful!
>> I had in fact just written a post on my blog asking for exactly this sort
>> of feedback - you can read it here 
>> -http://chrisdaley.biz/test-driven-development-in-vala-pt-1.html
>>
>> I've got some time to work on this over the next few weeks and hope to have
>> a usable release out for testing not long after, so now's the time for
>> anyone else interested in a testing framework to hit me up with your ideas!
>>
>> Have a good weekend,
>> Cheers
>> Chris D
>>
>>
>> 2016-01-08 14:29 GMT-08:00 Al Thomas :
>>
>> > > From: Chris Daley
>>
>> >
>> > > Sent: Tuesday, 5 January 2016, 1:16
>> > > Subject: Re: [Vala] Testing framework
>> > >
>> > > I've done some thinking about this over the last couple of months and
>> > used
>> > > the holiday period to finish off a few things, namely a port of Gherkin
>> > to
>> > > Vala. You can grab it from here if you want to check it out:
>> > > https://github.com/chebizarro/gherkin-vala
>> > >
>> > > I'm going to be sketching out what I think is a reasonable
>> > > roadmap over the next week or so with a view to an alpha release around
>> > the
>> > > end of February. If anyone is interested in contributing, or has any
>> > > specific ideas about what sort of features they would find the most
>> > useful,
>> >
>> > > please get in touch
>> >
>> >
>> > Hi,
>> >
>> > Great work on porting Gherkin 3 to Vala.
>> >
>> > I wanted to put forward a few ideas that I have been slowly
>> > researching over the past year or so in the hope they are
>> >
>> > insightful to any developments of testing tools for Vala.
>> >
>> > Gherkin
>> > ---
>> > Gherkin is a language for structuring human language in a
>> > way that allows business analysts, developers and testers to define
>> > features of an application.
>> >
>> > Some computer languages have tools available to developers to convert
>> >
>> > Gherkin to an outline of a computer program. The following meaningless
>> >
>> > example shows the structure. This uses PHP's Behat to convert Gherkin
>> >
>> > to PHP:
>> >
>> > Feature: test
>> >
>> > Background: given this is a test # features/test.feature:3
>> >
>> > Scenario: testing of app # features/test.feature:5
>> > When i run something
>> > Then it passes
>> >
>> > 1 scenario (1 undefined)
>> > 2 steps (2 undefined)
>> > 0m0.17s (9.41Mb)
>> >
>> > --- FeatureContext has missing steps. Define them with these snippets:
>> >
>> > /**
>> > * @When i run something
>> > */
>> > public function iRunSomething()
>> > {
>> > throw new PendingException();
>> > }
>> >
>> > /**
>> > * @Then it passes
>> > */
>> > public function itPasses()
>> > {
>> > throw new PendingException();
>> > }
>> >
>> > It is the feature context that forms the basis of generating
>> > automated acceptance tests from the features specified in
>> >
>> > Gherkin. The developer then fills in the gaps with code that
>> > drives the tests. In PHP web development this is a tool like
>> > Mink that can drive various headless web browsers.
>> >
>> > Automatic code generation for Vala
>> > --
>> > I can think of two approaches to generation code. I have
>> > tried neither.
>> >
>> > The first is to use libvala to generate a Vala AST then output
>> > the AST. Potentially libvala could be modified to generate a
>> >
>> > Genie version of the AST. This appeals to me.
>> >
>> > The other approach would be similar to Valadoc:
>> >
>> > https://git.gnome.org/browse/valadoc/tree/src/libvaladoc/api/formalparameter.vala#n131
>> >
>> > Code generation could also be useful for anyone wanting to
>> >
>> > develop a tool similar to RSpec. So a common approach using libvala
>> > may be helpful. I think Anjuta CTags also uses libvala for
>> >
>> > autosuggestion of function names etc. See:
>> >
>> > https://github.com/GNOME/anjuta/blob/master/plugins/symbol-db/anjuta-tags/ctags-visitor.vala
>> >
>> > Acceptance Testing Drivers
>> > --
>> > This is probably the hardest part given the wide range of
>> > interfaces available.
>> >
>> > Gherkin is from Cucumber written in Ruby with web application
>> > development in mind. So I think most tools there use web
>> >
>> > interfaces. In the Vala world this could be done with libsoup
>> > for a text analysis of the web interface, but also embedding
>> > Webkit or 

Re: [Vala] Testing framework

2016-02-01 Thread Steven Oliver
Hey, I just wanted to drop in and see if any progress had been made on this?
I for one am very excited about the possibility. 

Thank you,
Steven N. Oliver



On Fri, Jan 8, 2016 at 2:55 PM -0800, "Chris Daley"  
wrote:










Hi Al,

Thanks for the input, this is very much appreciated and incredibly useful!
I had in fact just written a post on my blog asking for exactly this sort
of feedback - you can read it here -
http://chrisdaley.biz/test-driven-development-in-vala-pt-1.html

I've got some time to work on this over the next few weeks and hope to have
a usable release out for testing not long after, so now's the time for
anyone else interested in a testing framework to hit me up with your ideas!

Have a good weekend,
Cheers
Chris D


2016-01-08 14:29 GMT-08:00 Al Thomas :

> > From: Chris Daley 
>
> > Sent: Tuesday, 5 January 2016, 1:16
> > Subject: Re: [Vala] Testing framework
> >
> > I've done some thinking about this over the last couple of months and
> used
> > the holiday period to finish off a few things, namely a port of Gherkin
> to
> > Vala. You can grab it from here if you want to check it out:
> > https://github.com/chebizarro/gherkin-vala
> >
> > I'm going to be sketching out what I think is a reasonable
> > roadmap over the next week or so with a view to an alpha release around
> the
> > end of February. If anyone is interested in contributing, or has any
> > specific ideas about what sort of features they would find the most
> useful,
>
> > please get in touch
>
>
> Hi,
>
> Great work on porting Gherkin 3 to Vala.
>
> I wanted to put forward a few ideas that I have been slowly
> researching over the past year or so in the hope they are
>
> insightful to any developments of testing tools for Vala.
>
> Gherkin
> ---
> Gherkin is a language for structuring human language in a
> way that allows business analysts, developers and testers to define
> features of an application.
>
> Some computer languages have tools available to developers to convert
>
> Gherkin to an outline of a computer program. The following meaningless
>
> example shows the structure. This uses PHP's Behat to convert Gherkin
>
> to PHP:
>
> Feature: test
>
> Background: given this is a test # features/test.feature:3
>
> Scenario: testing of app # features/test.feature:5
> When i run something
> Then it passes
>
> 1 scenario (1 undefined)
> 2 steps (2 undefined)
> 0m0.17s (9.41Mb)
>
> --- FeatureContext has missing steps. Define them with these snippets:
>
> /**
> * @When i run something
> */
> public function iRunSomething()
> {
> throw new PendingException();
> }
>
> /**
> * @Then it passes
> */
> public function itPasses()
> {
> throw new PendingException();
> }
>
> It is the feature context that forms the basis of generating
> automated acceptance tests from the features specified in
>
> Gherkin. The developer then fills in the gaps with code that
> drives the tests. In PHP web development this is a tool like
> Mink that can drive various headless web browsers.
>
> Automatic code generation for Vala
> --
> I can think of two approaches to generation code. I have
> tried neither.
>
> The first is to use libvala to generate a Vala AST then output
> the AST. Potentially libvala could be modified to generate a
>
> Genie version of the AST. This appeals to me.
>
> The other approach would be similar to Valadoc:
>
> https://git.gnome.org/browse/valadoc/tree/src/libvaladoc/api/formalparameter.vala#n131
>
> Code generation could also be useful for anyone wanting to
>
> develop a tool similar to RSpec. So a common approach using libvala
> may be helpful. I think Anjuta CTags also uses libvala for
>
> autosuggestion of function names etc. See:
>
> https://github.com/GNOME/anjuta/blob/master/plugins/symbol-db/anjuta-tags/ctags-visitor.vala
>
> Acceptance Testing Drivers
> --
> This is probably the hardest part given the wide range of
> interfaces available.
>
> Gherkin is from Cucumber written in Ruby with web application
> development in mind. So I think most tools there use web
>
> interfaces. In the Vala world this could be done with libsoup
> for a text analysis of the web interface, but also embedding
> Webkit or Gecko which also allows Javascript to be tested.
>
> Vala is often used for desktop GUI development. So Linux
> Desktop Testing Project ( http://ldtp.freedesktop.org/wiki/ )
> using Assistive Technology Service Provider Interface (
>
>
> https://en.wikipedia.org/wiki/Assistive_Technology_Service_Provider_Interface
>  ) may be relevant.
>
> Of course software is also developed for technical users. So
> there are potentially command line interfaces, D-Bus interfaces, shared
> library interfaces and so on to cater for.
>
> For command line interfaces I'm starting to think GLib's
> trap_subprocess may be useful:
>
> http://valadoc.org/#!api=glib-2.0/GLib.Test.trap_subprocess
> I'm trying to write functional tests for Genie, but some
>
> 

Re: [Vala] Testing framework

2016-02-01 Thread Chris Daley
Hi Evan,
Thanks for the offer, I've sent you a pull request on Github. I've got some
new Vala posts in the can that aren't related to Valadate that should be up
later this week as well.
Cheers
Chris D

2016-02-01 16:12 GMT-08:00 Evan Nemerson :

> Since you're actively blogging about Vala, how would you feel about
> being added to Planet Vala (planet.vala-project.org)?  Nobody on is
> very active right now, so it would be good to get some new blood…
>
>
> On Mon, 2016-02-01 at 14:37 -0800, Chris Daley wrote:
> > Hi Steven,
> >
> > It's still very much active, I've just had to take some time out to
> > do some
> > work on my night job (managing a Rock band). I'm drafting a blog post
> > this
> > afternoon with an update on progress and some new ways to contribute,
> > so
> > stay tuned.
> >
> > Cheers
> > Chris D
> >
> >
> >
> > 2016-02-01 14:22 GMT-08:00 Steven Oliver :
> >
> > > Hey,
> > > I just wanted to drop in and see if any progress had been made on
> > > this?
> > >
> > > I for one am very excited about the possibility.
> > >
> > > Thank you,
> > > Steven N. Oliver
> > >
> > >
> > >
> > > On Fri, Jan 8, 2016 at 2:55 PM -0800, "Chris Daley"  > > il.com>
> > > wrote:
> > >
> > > Hi Al,
> > > >
> > > > Thanks for the input, this is very much appreciated and
> > > > incredibly useful!
> > > > I had in fact just written a post on my blog asking for exactly
> > > > this sort
> > > > of feedback - you can read it here -http://chrisdaley.biz/test-dr
> > > > iven-development-in-vala-pt-1.html
> > > >
> > > > I've got some time to work on this over the next few weeks and
> > > > hope to have
> > > > a usable release out for testing not long after, so now's the
> > > > time for
> > > > anyone else interested in a testing framework to hit me up with
> > > > your ideas!
> > > >
> > > > Have a good weekend,
> > > > Cheers
> > > > Chris D
> > > >
> > > >
> > > > 2016-01-08 14:29 GMT-08:00 Al Thomas :
> > > >
> > > > > > From: Chris Daley
> > > >
> > > > >
> > > > > > Sent: Tuesday, 5 January 2016, 1:16
> > > > > > Subject: Re: [Vala] Testing framework
> > > > > >
> > > > > > I've done some thinking about this over the last couple of
> > > > > > months and
> > > > > used
> > > > > > the holiday period to finish off a few things, namely a port
> > > > > > of Gherkin
> > > > > to
> > > > > > Vala. You can grab it from here if you want to check it out:
> > > > > > https://github.com/chebizarro/gherkin-vala
> > > > > >
> > > > > > I'm going to be sketching out what I think is a reasonable
> > > > > > roadmap over the next week or so with a view to an alpha
> > > > > > release around
> > > > > the
> > > > > > end of February. If anyone is interested in contributing, or
> > > > > > has any
> > > > > > specific ideas about what sort of features they would find
> > > > > > the most
> > > > > useful,
> > > > >
> > > > > > please get in touch
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Great work on porting Gherkin 3 to Vala.
> > > > >
> > > > > I wanted to put forward a few ideas that I have been slowly
> > > > > researching over the past year or so in the hope they are
> > > > >
> > > > > insightful to any developments of testing tools for Vala.
> > > > >
> > > > > Gherkin
> > > > > ---
> > > > > Gherkin is a language for structuring human language in a
> > > > > way that allows business analysts, developers and testers to
> > > > > define
> > > > > features of an application.
> > > > >
> > > > > Some computer languages have tools available to developers to
> > > > > convert
> > > > >
> > > > > Gherkin to an outline of a computer program. The following
> > > > > meaningless
> > > > >
> > > > > example shows the structure. This uses PHP's Behat to convert
> > > > > Gherkin
> > > > >
> > > > > to PHP:
> > > > >
> > > > > Feature: test
> > > > >
> > > > > Background: given this is a test # features/test.feature:3
> > > > >
> > > > > Scenario: testing of app # features/test.feature:5
> > > > > When i run something
> > > > > Then it passes
> > > > >
> > > > > 1 scenario (1 undefined)
> > > > > 2 steps (2 undefined)
> > > > > 0m0.17s (9.41Mb)
> > > > >
> > > > > --- FeatureContext has missing steps. Define them with these
> > > > > snippets:
> > > > >
> > > > > /**
> > > > > * @When i run something
> > > > > */
> > > > > public function iRunSomething()
> > > > > {
> > > > > throw new PendingException();
> > > > > }
> > > > >
> > > > > /**
> > > > > * @Then it passes
> > > > > */
> > > > > public function itPasses()
> > > > > {
> > > > > throw new PendingException();
> > > > > }
> > > > >
> > > > > It is the feature context that forms the basis of generating
> > > > > automated acceptance tests from the features specified in
> > > > >
> > > > > Gherkin. The developer then fills in the gaps with code that
> > > > > drives the tests. In PHP web development this is a tool like
> > > > > Mink that can drive various headless web browsers.
> > > > >
> > > > > 

[Vala] invalid C code generated & a compiler crash

2016-02-01 Thread Matthias Berndt
Hi,

The vala compiler generates invalid C code for the following program:

class Aaa {
  public static int main(string[] args) {
stdout.printf("%s\n", typeof(T).name());
return 0;
  }
}

Shouldn't it be disallowed to typeof() a type parameter in a static method (or 
a generic type parametrized with a type parameter and so forth)?

And here's another interesting code sample:

class Aaa {
  public class Bbb {
public signal void x(T t, U u);
  }
}
int main(string[] args) {
  var b = new Aaa.Bbb();
  b.x("foo","bar");
  return 0;
}

This leads to a compiler crash.

Cheers,
Matthias
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list