tests: fix eventbus_test.v
parent
666801f9f9
commit
51da324465
|
@ -7,7 +7,6 @@ import v.pref
|
|||
const (
|
||||
skip_test_files = [
|
||||
'vlib/arrays/arrays_test.v',
|
||||
'vlib/eventbus/eventbus_test.v',
|
||||
'vlib/json/json_test.v',
|
||||
'vlib/v/tests/enum_bitfield_test.v',
|
||||
'vlib/v/tests/num_lit_call_method_test.v',
|
||||
|
|
|
@ -65,8 +65,10 @@ fn (pb mut Publisher) publish(name string, sender voidptr, args voidptr) {
|
|||
if event.once {
|
||||
pb.registry.events.delete(i)
|
||||
}
|
||||
if event.receiver != voidptr(0) {
|
||||
event.handler(event.receiver, args, sender)
|
||||
//
|
||||
x := event.receiver
|
||||
if x != 0 {
|
||||
event.handler(x, args, sender)
|
||||
} else {
|
||||
event.handler(sender, args, voidptr(0))
|
||||
}
|
||||
|
|
|
@ -9,6 +9,12 @@ import gx
|
|||
import gg
|
||||
import glm
|
||||
import gl
|
||||
/*
|
||||
TODO
|
||||
!!!!!!
|
||||
Use a font atlas
|
||||
!!!!!!
|
||||
*/
|
||||
|
||||
#flag windows -I @VROOT/thirdparty/freetype/include
|
||||
#flag windows -L @VROOT/thirdparty/freetype/win64
|
||||
|
|
|
@ -35,6 +35,9 @@ fn perform_speak(s Speaker) {
|
|||
assert true
|
||||
name := s.name()
|
||||
assert name == 'Dog' || name == 'Cat'
|
||||
//if s is Dog {
|
||||
//assert name == 'Dog'
|
||||
//}
|
||||
println(s.name())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue