github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/tests/tinygotest/main_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing" // This is the tinygo testing package
     5  )
     6  
     7  func TestFail1(t *testing.T) {
     8  	t.Error("TestFail1 failed because of stuff and things")
     9  }
    10  
    11  func TestFail2(t *testing.T) {
    12  	t.Fatalf("TestFail2 failed for %v ", "reasons")
    13  }
    14  
    15  func TestFail3(t *testing.T) {
    16  	t.Fail()
    17  	t.Logf("TestFail3 failed for %v ", "reasons")
    18  }
    19  
    20  func TestPass(t *testing.T) {
    21  	t.Log("TestPass passed")
    22  }
    23  
    24  func BenchmarkNotImplemented(b *testing.B) {
    25  }