mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-10-31 09:09:18 +00:00 
			
		
		
		
	Add test case
This commit is contained in:
		
							parent
							
								
									b7e4c0b363
								
							
						
					
					
						commit
						645db6eb63
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		|  | @ -1495,5 +1495,22 @@ TEST("repro", function() | |||
| 		end | ||||
| 		CHECK(counter == 1) | ||||
| 	end | ||||
| 
 | ||||
| 	do CASE "#3" -- ISSUE #171 | ||||
| 		local world = world_new() | ||||
| 		local component1 = world:component() | ||||
| 		local tag1 = world:entity() | ||||
| 		 | ||||
| 		local query = world:query(component1):with(tag1):cached() | ||||
| 		 | ||||
| 		local entity = world:entity() | ||||
| 		world:set(entity, component1, "some data") | ||||
| 
 | ||||
| 		local counter = 0 | ||||
| 		for x in query:iter() do | ||||
| 			counter += 1 | ||||
| 		end | ||||
| 		CHECK(counter == 0) | ||||
| 	end | ||||
| end) | ||||
| FINISH() | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue