Code Monkey home page Code Monkey logo

avl's Introduction

AVL

Please see Issues for bugs and creating new tasks.

How to build

  1. Prerequisites

    • Mac
       sudo port install astyle automake libtool freeglut glew glm glfw
    • Linux
      • Only need to install libraries
       sudo apt-get install **
  2. Create configure script.

    autoreconf --install
  3. Create Makefiles.

    ./configure
  4. Make.

    make
  5. Install

    sudo make install

This would install avl to /usr/local/bin, header files to /usr/local/include and libraries to /usr/local/lib.

How to run test cases

make check

You can run make check -j [N] if you have multiple CPUs.

How to add a test case

Suppose you want to test if control flow.

  1. Create if1.avl in tests/avl.test/, assuming you have multiple test cases for if.

  2. Write a bash script if1.sh, also put it into tests/avl.test/:

    #!/bin/bash
    
    avl -o if1 if1.avl

Don't forget chmod +x if1.sh. If the test case is expected to fail, the bash script should be as follows: ```bash #!/bin/bash

avl -t if1.avl
```

since the error should be reported before invoking g++.

  1. Modify tests/avl.test/Makefile.am, add if1.sh to TESTS variable. If the test case is expected to fail, also add the script to XFAIL_TESTS variable. Whether the test case passes or fails depends on the exit code of the script (0 for success).

  2. Rerun make check.

avl's People

Contributors

seemuch avatar stellaxz avatar wqfish avatar yuzheng21 avatar zjiuyang avatar

Watchers

 avatar

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.