31 lines
432 B
Go
31 lines
432 B
Go
package annotation
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
)
|
|
|
|
func TestParseInject(t *testing.T) {
|
|
a1 := "@Inject"
|
|
a, err := ParseInject(a1)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
a2 := "@Inject()"
|
|
a, err = ParseInject(a2)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
a3 := "@Inject(name=string)"
|
|
a, err = ParseInject(a3)
|
|
if nil != err {
|
|
log.Printf("%v", err)
|
|
}
|
|
log.Printf("%v", a)
|
|
|
|
}
|