Skip to content

Commit 4ffc3ab

Browse files
committed
added some test data (from mockaroo)
1 parent 5a0c9ca commit 4ffc3ab

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

files/test.csv

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
id,first_name,age,ok
2+
1,Julie,80.244,false
3+
2,Jose,11.569,true
4+
3,Lois,12.339,true
5+
4,Walter,63.173,false
6+
5,Timothy,57.063,true
7+
6,Barbara,79.705,true
8+
7,Douglas,19.347,false
9+
8,Tina,16.909,true
10+
9,Gregory,67.749,true
11+
10,Larry,43.705,true
12+
11,Tina,9.931,true
13+
12,Kelly,72.657,true
14+
13,Marilyn,10.901,true
15+
14,Gregory,9.966,true
16+
15,Earl,10.875,true
17+
16,Evelyn,33.268,true
18+
17,Carol,54.498,false
19+
18,Alice,2.505,true
20+
19,Randy,39.775,false

src/tests/csv_test.f90

+4-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ program csv_test
2424
integer,dimension(:),allocatable :: itypes
2525

2626
! read the file:
27-
call f%read('test.csv',header_row=1,status_ok=status_ok)
27+
call f%read('../files/test.csv',header_row=1,status_ok=status_ok)
2828

2929
! print the header and type info:
3030
call f%get_header(header,status_ok)
@@ -44,21 +44,13 @@ program csv_test
4444
end do
4545

4646
write(*,*) ''
47-
write(*,*) 'get the position vectors:'
47+
write(*,*) 'get some vectors:'
4848

4949
write(*,*) ''
50-
write(*,*) 'x:'
51-
call f%get(2,x,status_ok)
50+
write(*,*) 'age:'
51+
call f%get(3,x,status_ok)
5252
write(*,'(F27.16,1x)',advance='NO') x
5353
write(*,*) ''
54-
write(*,*) 'y:'
55-
call f%get(3,y,status_ok)
56-
write(*,'(F27.16,1x)',advance='NO') y
57-
write(*,*) ''
58-
write(*,*) 'z:'
59-
call f%get(4,z,status_ok)
60-
write(*,'(F27.16,1x)',advance='NO') z
61-
write(*,*) ''
6254

6355
! now test creating a CSV:
6456
call f2%open('test2.csv',n_cols=4,status_ok=status_ok)

0 commit comments

Comments
 (0)