mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			81 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // exact-check
 | |
| 
 | |
| const EXPECTED = [
 | |
|     {
 | |
|         'query': '()',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'side_effect' },
 | |
|             { 'path': 'tuple_unit', 'name': 'one' },
 | |
|             { 'path': 'tuple_unit', 'name': 'two' },
 | |
|             { 'path': 'tuple_unit', 'name': 'nest' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': 'primitive:unit',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'side_effect' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': 'primitive:tuple',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'one' },
 | |
|             { 'path': 'tuple_unit', 'name': 'two' },
 | |
|             { 'path': 'tuple_unit', 'name': 'nest' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(P)',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'not_tuple' },
 | |
|             { 'path': 'tuple_unit', 'name': 'one' },
 | |
|             { 'path': 'tuple_unit', 'name': 'two' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(P,)',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'one' },
 | |
|             { 'path': 'tuple_unit', 'name': 'two' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(P, P)',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'two' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(P, ())',
 | |
|         'returned': [],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(Q, ())',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'nest' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(R)',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'nest' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
|     {
 | |
|         'query': '(u32)',
 | |
|         'returned': [
 | |
|             { 'path': 'tuple_unit', 'name': 'nest' },
 | |
|         ],
 | |
|         'in_args': [],
 | |
|     },
 | |
| ];
 | 
