Add various deleted flags to entities | Add active to subscriptions | Add DeleteUser && DeleteChannel endpoints [skip-tests]
This commit is contained in:
@@ -177,6 +177,14 @@ func AssertTrue(t *testing.T, key string, v bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func AssertFalse(t *testing.T, key string, v bool) {
|
||||
if v {
|
||||
t.Errorf("AssertFalse(%s) failed", key)
|
||||
t.Error(string(debug.Stack()))
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
func AssertNotDefault[T comparable](t *testing.T, key string, v T) {
|
||||
if v == *new(T) {
|
||||
t.Errorf("AssertNotDefault(%s) failed", key)
|
||||
@@ -307,7 +315,7 @@ func AssertAny(v any) {
|
||||
}
|
||||
|
||||
func AssertNil(t *testing.T, key string, v any) {
|
||||
if v != nil {
|
||||
if !langext.IsNil(v) {
|
||||
t.Errorf("AssertNil(%s) failed - actual value:\n%+v", key, v)
|
||||
t.Error(string(debug.Stack()))
|
||||
t.FailNow()
|
||||
@@ -315,7 +323,7 @@ func AssertNil(t *testing.T, key string, v any) {
|
||||
}
|
||||
|
||||
func AssertNotNil(t *testing.T, key string, v any) {
|
||||
if v == nil {
|
||||
if langext.IsNil(v) {
|
||||
t.Errorf("AssertNotNil(%s) failed", key)
|
||||
t.Error(string(debug.Stack()))
|
||||
t.FailNow()
|
||||
|
||||
Reference in New Issue
Block a user