31 lines
451 B
Go
31 lines
451 B
Go
package annotation
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
)
|
|
|
|
func TestParseResource(t *testing.T) {
|
|
a1 := "@Resource"
|
|
a, err := ParseResource(a1)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
a2 := "@Resource( )"
|
|
a, err = ParseResource(a2)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
a3 := "@Resource(name=string1232)"
|
|
a, err = ParseResource(a3)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
}
|