Code Monkey home page Code Monkey logo

vtest's Introduction

vtest 0.1.0

Handy unils for writing tests in V language.

This lirary provides several assert_*** functions which enhance the possibilites of builtin assert statement, giving the colored diff of expected and gotten value.

When generic functions will be available in V, concrete assert_eq_str and assert_eq_int will be replaced with one assert_eq function.

screenshot

The version of this module will remain in 0.x.x unless the language API's are finalized and implemented.

Examples

import popzxc.vtest

fn test_fail_str() {
    assert vtest.assert_eq_str("hello world", "hello wolrd")
}

fn test_fail_int() {
    assert vtest.assert_eq_int(1000, 2000)
}

fn test_fail_true() {
    assert vtest.assert_true(false)
}

fn test_fail_false() {
    assert vtest.assert_false(true)
}

Installaction

Via vpm:

v install popzxc.vtest

Via vpkg:

vpkg get https://github.com/popzxc/vtest

Contributing

Feel free to open pull requests!

License

MIT

vtest's People

Contributors

djoodle avatar popzxc 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.