Code Monkey home page Code Monkey logo

gnatbdd's People

Contributors

briot avatar irvise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gnatbdd's Issues

The code generator doesn't pass multiline strings

Given the following scenario:

    Scenario: Constructing the PPM header
        Given c ← canvas(5, 3)
        When ppm ← canvas_to_ppm(c)
        Then lines 1-3 of ppm are
            """
            P3
            5 3
            255
            """

With a regexp of:

   -- @then ^lines (\d+)-(\d+) of ppm are$
   procedure Test (Start_Line, End_Line : Positive; Str : String);

Fails to generate with the following error:

Too many parameters (or not enough parenthesis groups) for step
   ^lines (\d+)-(\d+) of ppm are$

Remove the String parameter and it generates, but incorrectly. The multiline string is parsed by gnatbdd, but not passed as an extra parameter at the end of the function.

Cannot use in/out on parameters, cannot return values

There are some issues I don't know how to work out.

  1. gnatbdd copies the in out specification to the generated source. See below, I would put in String normally.

  2. How do you handle return values? 'a' below?

    -- @given ^a ← tuple((\d+.\d+), (\d+.\d+), (\d+.\d+), (\d+.\d+))$
    procedure Given_A_Tuple (A : out Tuple; X, Y, Z, W : String);

@and and @but not supported

Please add these to complete the project, gnatbdd-codegen.adb: 51

   Cst_Comment_Re : constant Pattern_Matcher :=
     Compile ("--\s*@(given|then|when|and|but)\s+");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.