Skip to content

Commit 63771f9

Browse files
authored
Merge pull request #626 from yngve793/impr/test_field_edge_cases_striped
Introduce increment and decrement tests for catb
2 parents c4f1c01 + 133cd9c commit 63771f9

6 files changed

Lines changed: 104 additions & 0 deletions

File tree

applications/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ endif ()
7676

7777
set(small ${testdata}/small.sgy)
7878
set(long ${testdata}/long.sgy)
79+
set(increment ${testdata}/increment.sgy)
80+
set(decrement ${testdata}/decrement.sgy)
7981
set(test ${CMAKE_CURRENT_SOURCE_DIR}/test)
8082
add_test(NAME catr.arg.t1 COMMAND segyio-catr -t 0 ${small})
8183
add_test(NAME catr.arg.t2 COMMAND segyio-catr -t 5 ${small})
@@ -121,6 +123,8 @@ add_custom_command(
121123
test/cath.output
122124
test/catr.output
123125
COMMAND segyio-catb ${small} > catb.out
126+
COMMAND segyio-catb ${increment} > catb-inc.out
127+
COMMAND segyio-catb ${decrement} > catb-dec.out
124128
COMMAND segyio-catb ${small} -n -d > catbnd.out
125129
COMMAND segyio-cath ${small} > cath.out
126130
COMMAND segyio-catb ${long} > catb-long.out
@@ -147,6 +151,14 @@ add_test(NAME catb-long.output
147151
COMMAND ${CMAKE_COMMAND} -E compare_files ${test}/catb-long.output
148152
catb-long.out
149153
)
154+
add_test(NAME catb-inc.output
155+
COMMAND ${CMAKE_COMMAND} -E compare_files ${test}/catb-inc.output
156+
catb-inc.out
157+
)
158+
add_test(NAME catb-dec.output
159+
COMMAND ${CMAKE_COMMAND} -E compare_files ${test}/catb-dec.output
160+
catb-dec.out
161+
)
150162
add_test(NAME cath.output
151163
COMMAND ${CMAKE_COMMAND} -E compare_files ${test}/cath.output cath.out
152164
)

applications/test/catb-dec.output

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
jobid 2147483647
2+
lino 2147483646
3+
reno 2147483645
4+
ntrpr 32764
5+
nart 32763
6+
hdt 32762
7+
dto 32761
8+
hns 65527
9+
nso 65526
10+
format 1
11+
fold 32757
12+
tsort 32756
13+
vscode 32755
14+
hsfs 32754
15+
hsfe 32753
16+
hslen 32752
17+
hstyp 32751
18+
schn 32750
19+
hstas 32749
20+
hstae 32748
21+
htatyp 32747
22+
hcorr 32746
23+
bgrcv 32745
24+
rcvm 32744
25+
mfeet 32743
26+
polyt 32742
27+
vpol 32741
28+
extntrpr 5
29+
extnart 2147483619
30+
exthns 4
31+
exthdt 1125899906842594.000000
32+
extdto 1125899906842593.000000
33+
extnso 2147483615
34+
extfold 2147483614
35+
intconst 2147483613
36+
rev 218
37+
revmin 217
38+
trflag 32729
39+
exth 0
40+
maxtrh 32727
41+
survty 32726
42+
timebc 32725
43+
ntrst 18446744073709551572
44+
ftroff 18446744073709551571
45+
ntr 2147483602

applications/test/catb-inc.output

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
jobid -2147483648
2+
lino -2147483647
3+
reno -2147483646
4+
ntrpr -32765
5+
nart -32764
6+
hdt -32763
7+
dto -32762
8+
hns 7
9+
nso 8
10+
format 1
11+
fold -32758
12+
tsort -32757
13+
vscode -32756
14+
hsfs -32755
15+
hsfe -32754
16+
hslen -32753
17+
hstyp -32752
18+
schn -32751
19+
hstas -32750
20+
hstae -32749
21+
htatyp -32748
22+
hcorr -32747
23+
bgrcv -32746
24+
rcvm -32745
25+
mfeet -32744
26+
polyt -32743
27+
vpol -32742
28+
extntrpr 5
29+
extnart -2147483620
30+
exthns 4
31+
exthdt -1125899906842594.000000
32+
extdto -1125899906842593.000000
33+
extnso -2147483616
34+
extfold -2147483615
35+
intconst -2147483614
36+
rev 36
37+
revmin 37
38+
trflag -32730
39+
exth 0
40+
maxtrh -32728
41+
survty -32727
42+
timebc -32726
43+
ntrst 43
44+
ftroff 44
45+
ntr -2147483603

lib/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ if (NOT BUILD_TESTING)
7272
return ()
7373
endif ()
7474

75+
configure_file(${testdata}/decrement.sgy test-data/decrement.sgy COPYONLY)
76+
configure_file(${testdata}/increment.sgy test-data/increment.sgy COPYONLY)
7577
configure_file(${testdata}/small.sgy test-data/small.sgy COPYONLY)
7678
configure_file(${testdata}/long.sgy test-data/long.sgy COPYONLY)
7779
configure_file(${testdata}/small-ps-dec-il-xl-off.sgy test-data/small-ps-dec-il-xl-off.sgy COPYONLY)

test-data/decrement.sgy

4.77 KB
Binary file not shown.

test-data/increment.sgy

4.77 KB
Binary file not shown.

0 commit comments

Comments
 (0)