Code Monkey home page Code Monkey logo

siguici / vut Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 27 KB

VUT is a lightweight framework for rule validation and unit testing in Vlang. Simplify code correctness checks, data validation, and unit testing in your V projects with this efficient tool.

Home Page: https://vpm.vlang.io/packages/siguici.vut

License: MIT License

V 100.00%
vlang vlang-package testing-framework test-suite vut test-suites unit-testing assert assertions ensure

vut's Introduction

Validation and Unit Testing Framework for Vlang

VUT is a minimalistic framework for validating rules and conducting unit tests in Vlang. Simplify code validation and ensure component correctness effortlessly.

Installation

  • Install VUT using VPM (recommanded):
v install siguici.vut
  • Install VUT using Git:
mkdir ${V_MODULES:-$HOME/.vmodules}/siguici
git  clone --depth=1 https://github.com/siguici/vut ${V_MODULES:-$HOME/.vmodules}/siguici/vut
  • Use VUT as a project dependency:
Module {
    //...
	dependencies: [
        'siguici.vut'
        //...
    ]
}

Usage

Filtering

import vut { filter }

assert filter(true).is_bool()
assert filter(true).is_true()
assert filter(2).is_any_int()
assert filter(5.4).is_any_float()
assert filter(8).is_num() // any_int or any_float

Assurance

import vut { ensure }

t := true

ensure(t).is_bool().is_true()

Expectation

import vut { expect }

t := true

expect(t).to_be_bool().to_be_true()

vut's People

Contributors

siguici avatar

Stargazers

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