Add new acceptance test scenario (017)
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:596:22
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(6) })
  ```
			
			
This commit is contained in:
		
							parent
							
								
									00b800c456
								
							
						
					
					
						commit
						6e46e7562e
					
				| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
name = "acceptance_test_017"
 | 
			
		||||
version = "0.0.0"
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
use aiken/builtin
 | 
			
		||||
 | 
			
		||||
pub fn slice(bytes: ByteArray, start: Int, end: Int) -> ByteArray {
 | 
			
		||||
  builtin.slice_bytearray(start, end, bytes)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn take(bytes: ByteArray, n: Int) -> ByteArray {
 | 
			
		||||
  slice(bytes, 0, n)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
test take_1() {
 | 
			
		||||
  take(#[1, 2, 3], 2) == #[1, 2]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue