File: array

package info (click to toggle)
libpmemobj-cpp 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,568 kB
  • sloc: cpp: 14,128; sh: 643; ansic: 497; perl: 381; makefile: 8
file content (23 lines) | stat: -rwxr-xr-x 350 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -e

SRC=$(pwd)
cd "$AUTOPKGTEST_TMP"

cmake "$SRC/examples/array"
make

a() { echo "$*"; ./array file "$@" | tee -a log; }

a alloc myArray 4
a print myArray
a realloc myArray 7
a print myArray
a free myArray
a print myArray

diff log - <<END
myArray = [0, 1, 2, 3]
myArray = [0, 1, 2, 3, 0, 0, 0]
No array found with name: myArray
END