mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: fix eventbus_test.v
This commit is contained in:
parent
666801f9f9
commit
51da324465
@ -7,7 +7,6 @@ import v.pref
|
|||||||
const (
|
const (
|
||||||
skip_test_files = [
|
skip_test_files = [
|
||||||
'vlib/arrays/arrays_test.v',
|
'vlib/arrays/arrays_test.v',
|
||||||
'vlib/eventbus/eventbus_test.v',
|
|
||||||
'vlib/json/json_test.v',
|
'vlib/json/json_test.v',
|
||||||
'vlib/v/tests/enum_bitfield_test.v',
|
'vlib/v/tests/enum_bitfield_test.v',
|
||||||
'vlib/v/tests/num_lit_call_method_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 {
|
if event.once {
|
||||||
pb.registry.events.delete(i)
|
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 {
|
} else {
|
||||||
event.handler(sender, args, voidptr(0))
|
event.handler(sender, args, voidptr(0))
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,12 @@ import gx
|
|||||||
import gg
|
import gg
|
||||||
import glm
|
import glm
|
||||||
import gl
|
import gl
|
||||||
|
/*
|
||||||
|
TODO
|
||||||
|
!!!!!!
|
||||||
|
Use a font atlas
|
||||||
|
!!!!!!
|
||||||
|
*/
|
||||||
|
|
||||||
#flag windows -I @VROOT/thirdparty/freetype/include
|
#flag windows -I @VROOT/thirdparty/freetype/include
|
||||||
#flag windows -L @VROOT/thirdparty/freetype/win64
|
#flag windows -L @VROOT/thirdparty/freetype/win64
|
||||||
|
@ -35,6 +35,9 @@ fn perform_speak(s Speaker) {
|
|||||||
assert true
|
assert true
|
||||||
name := s.name()
|
name := s.name()
|
||||||
assert name == 'Dog' || name == 'Cat'
|
assert name == 'Dog' || name == 'Cat'
|
||||||
|
//if s is Dog {
|
||||||
|
//assert name == 'Dog'
|
||||||
|
//}
|
||||||
println(s.name())
|
println(s.name())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user