@@ -14,9 +14,14 @@ func TestChannels(t *testing.T) {
1414 Expected string
1515 }{
1616 {
17- Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 ).Actions (Enter , Exit )).toCmd (),
17+ Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 , false ).Actions (Enter , Exit )).toCmd (),
1818 Expected : "SETCHAN foo NEARBY cat FENCE DETECT enter,exit ROAM dog * 50" ,
1919 },
20+ {
21+ Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 ,true ).Actions (Enter , Exit )).toCmd (),
22+ Expected : "SETCHAN foo NEARBY cat FENCE NODWELL DETECT enter,exit ROAM dog * 50" ,
23+ },
24+
2025 }
2126
2227 for _ , test := range tests {
@@ -32,9 +37,13 @@ func TestHooks(t *testing.T) {
3237 Expected string
3338 }{
3439 {
35- Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 ).Actions (Enter , Exit )).toCmd (),
40+ Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 , false ).Actions (Enter , Exit )).toCmd (),
3641 Expected : "SETHOOK foo localhost:1337 NEARBY cat FENCE DETECT enter,exit ROAM dog * 50" ,
3742 },
43+ {
44+ Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 ,true ).Actions (Enter , Exit )).toCmd (),
45+ Expected : "SETHOOK foo localhost:1337 NEARBY cat FENCE NODWELL DETECT enter,exit ROAM dog * 50" ,
46+ },
3847 }
3948
4049 for _ , test := range tests {
@@ -107,12 +116,19 @@ func TestGeofence(t *testing.T) {
107116 Expected : "NEARBY fleet CLIP CURSOR 5 FENCE DETECT enter,exit,cross COMMANDS set,del HASHES 5 POINT 10 20 30" ,
108117 },
109118 {
110- Cmd : geofence .Roam ("agent" , "target" , "*" , 100 ).
119+ Cmd : geofence .Roam ("agent" , "target" , "*" , 100 , false ).
111120 Distance ().
112121 Wherein ("price" , 20 , 30 ).
113122 WhereEval ("foo" , "arg1" , "arg2" ).toCmd (),
114123 Expected : "NEARBY agent WHEREIN price 2 20 30 WHEREEVAL foo 2 arg1 arg2 DISTANCE FENCE ROAM target * 100" ,
115124 },
125+ {
126+ Cmd : geofence .Roam ("agent" , "target" , "*" , 100 ,true ).
127+ Distance ().
128+ Wherein ("price" , 20 , 30 ).
129+ WhereEval ("foo" , "arg1" , "arg2" ).toCmd (),
130+ Expected : "NEARBY agent WHEREIN price 2 20 30 WHEREEVAL foo 2 arg1 arg2 DISTANCE FENCE NODWELL ROAM target * 100" ,
131+ },
116132 {
117133 Cmd : geofence .Within ("foo" ).
118134 Bounds (10 , 20 , 30 , 40 ).
0 commit comments