* Improve snapshot testing Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			625 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			625 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Result of unparsing boolean_logical_and.kcl
 | 
						|
---
 | 
						|
aa = true & false
 | 
						|
a = if aa {
 | 
						|
  1
 | 
						|
} else {
 | 
						|
  2
 | 
						|
}
 | 
						|
assert(a == 2, "right branch of and is false makes the whole expression false")
 | 
						|
 | 
						|
bb = false & true
 | 
						|
b = if bb {
 | 
						|
  1
 | 
						|
} else {
 | 
						|
  2
 | 
						|
}
 | 
						|
assert(b == 2, "left branch of and is false makes the whole expression false")
 | 
						|
 | 
						|
cc = true & true
 | 
						|
c = if cc {
 | 
						|
  1
 | 
						|
} else {
 | 
						|
  2
 | 
						|
}
 | 
						|
assert(c == 1, "both branches of and are true makes the whole expression true")
 | 
						|
 | 
						|
dd = false & false
 | 
						|
d = if dd {
 | 
						|
  1
 | 
						|
} else {
 | 
						|
  2
 | 
						|
}
 | 
						|
assert(d == 2, "both branches of and are false makes the whole expression false")
 |