logoRemuria

UdonTest

0.5.2 Public

UdonTest

Simple test library for UdonSharp.

Installation

To use this package, you need to add my package repository. Please read more details here.

Please install this package with Creator Companion or VPM CLI.

Creator Companion

  1. Enable the koyashiro package repository.

    image

  2. Find UdonTest from the list of packages and install any version you want.

VPM CLI

  1. Execute the following command to install the package.

    vpm add package net.koyashiro.udontest
    

Example

using UdonSharp;
using Koyashiro.UdonTest;

public class UdonTestSample : UdonSharpBehaviour
{
    public void Start()
    {
        Assert.True(true); // OK!
        Assert.True(false); // FAILED!

        Assert.False(false); // OK!
        Assert.False(true); // FAILED!

        Assert.Null(null); // OK!
        Assert.Null(""); // FAILED!

        Assert.Equal(1, 1); // OK!
        Assert.Equal(1, 2); // FAILED!
        Assert.Equal(1, 1f); // FAILED!

        Assert.Equal("valid", "valid"); // OK!
        Assert.Equal("valid", "invalid"); // FAILED!

        Assert.Equal(new string[] { "first", "second" }, new string[] { "first", "second" }); // OK!
        Assert.Equal(new string[] { "first", "second", "third" }, new string[] { "first", "second" }); // FAILED!
    }
}

image

Keywords

No keywords found.

Install via VCC

Package ID

net.koyashiro.udontest

Unity Version

undefined

Unity Release

undefined

VRChat Version

undefined

Author

License

MIT

Documentation URL

undefined

Changelog URL

undefined