// Copyright 2018 gf Author(https://github.com/gogf/gf). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package gtest import ( "testing" ) // T is the testing unit case management object. type T struct { *testing.T } // Assert checks and EQUAL. func (t *T) Assert(value, expect interface{}) { Assert(value, expect) } // AssertEQ checks and EQUAL, including their TYPES. func (t *T) AssertEQ(value, expect interface{}) { AssertEQ(value, expect) } // AssertNE checks and NOT EQUAL. func (t *T) AssertNE(value, expect interface{}) { AssertNE(value, expect) } // AssertNQ checks and NOT EQUAL, including their TYPES. func (t *T) AssertNQ(value, expect interface{}) { AssertNQ(value, expect) } // AssertGT checks is GREATER THAN . // Notice that, only string, integer and float types can be compared by AssertGT, // others are invalid. func (t *T) AssertGT(value, expect interface{}) { AssertGT(value, expect) } // AssertGE checks is GREATER OR EQUAL THAN . // Notice that, only string, integer and float types can be compared by AssertGTE, // others are invalid. func (t *T) AssertGE(value, expect interface{}) { AssertGE(value, expect) } // AssertLT checks is LESS EQUAL THAN . // Notice that, only string, integer and float types can be compared by AssertLT, // others are invalid. func (t *T) AssertLT(value, expect interface{}) { AssertLT(value, expect) } // AssertLE checks is LESS OR EQUAL THAN . // Notice that, only string, integer and float types can be compared by AssertLTE, // others are invalid. func (t *T) AssertLE(value, expect interface{}) { AssertLE(value, expect) } // AssertIN checks is IN . // The should be a slice, // but the can be a slice or a basic type variable. func (t *T) AssertIN(value, expect interface{}) { AssertIN(value, expect) } // AssertNI checks is NOT IN . // The should be a slice, // but the can be a slice or a basic type variable. func (t *T) AssertNI(value, expect interface{}) { AssertNI(value, expect) } // Error panics with given . func (t *T) Error(message ...interface{}) { Error(message...) } // Fatal prints to stderr and exit the process. func (t *T) Fatal(message ...interface{}) { Fatal(message...) }