...

Source file src/github.com/ThalesIgnite/crypto11/attributes_test.go

Documentation: github.com/ThalesIgnite/crypto11

     1  package crypto11
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestSetNoPanicOnWrongType(t *testing.T) {
    10  	a := NewAttributeSet()
    11  	err := a.Set(CkaId, []string{"this is not allowed"})
    12  	assert.Error(t, err)
    13  }
    14  
    15  func TestNewAttributeNoPanicOnWrongType(t *testing.T) {
    16  	_, err := NewAttribute(CkaId, []string{"this is not allowed"})
    17  	assert.Error(t, err)
    18  }
    19  

View as plain text