Skip to content

Commit

Permalink
make this test less sensitive to variations in floating-point number …
Browse files Browse the repository at this point in the history
…display.
  • Loading branch information
jepler committed Mar 16, 2007
1 parent 234c07b commit 0333177
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 357 deletions.
355 changes: 6 additions & 349 deletions tests/abs.0/expected
Original file line number Diff line number Diff line change
@@ -1,350 +1,7 @@
-0.990000 0.990000
-0.980000 0.980000
-0.970000 0.970000
-0.960000 0.960000
-0.950000 0.950000
-0.940000 0.940000
-0.930000 0.930000
-0.920000 0.920000
-0.910000 0.910000
-0.900000 0.900000
-0.890000 0.890000
-0.880000 0.880000
-0.870000 0.870000
-0.860000 0.860000
-0.850000 0.850000
-0.840000 0.840000
-0.830000 0.830000
-0.820000 0.820000
-0.810000 0.810000
-0.800000 0.800000
-0.790000 0.790000
-0.780000 0.780000
-0.770000 0.770000
-0.760000 0.760000
-0.750000 0.750000
-0.740000 0.740000
-0.730000 0.730000
-0.720000 0.720000
-0.710000 0.710000
-0.700000 0.700000
-0.690000 0.690000
-0.680000 0.680000
-0.670000 0.670000
-0.660000 0.660000
-0.650000 0.650000
-0.640000 0.640000
-0.630000 0.630000
-0.620000 0.620000
-0.610000 0.610000
-0.600000 0.600000
-0.590000 0.590000
-0.580000 0.580000
-0.570000 0.570000
-0.560000 0.560000
-0.550000 0.550000
-0.540000 0.540000
-0.530000 0.530000
-0.520000 0.520000
-0.510000 0.510000
-0.500000 0.500000
-0.490000 0.490000
-0.480000 0.480000
-0.470000 0.470000
-0.460000 0.460000
-0.450000 0.450000
-0.440000 0.440000
-0.430000 0.430000
-0.420000 0.420000
-0.410000 0.410000
-0.400000 0.400000
-0.390000 0.390000
-0.380000 0.380000
-0.370000 0.370000
-0.360000 0.360000
-0.350000 0.350000
-0.340000 0.340000
-0.330000 0.330000
-0.320000 0.320000
-0.310000 0.310000
-0.300000 0.300000
-0.290000 0.290000
-0.280000 0.280000
-0.270000 0.270000
-0.260000 0.260000
0.000000 0.000000
0.250000 0.250000
-0.250000 0.250000
-0.240000 0.240000
-0.230000 0.230000
-0.220000 0.220000
-0.210000 0.210000
-0.200000 0.200000
-0.190000 0.190000
-0.180000 0.180000
-0.170000 0.170000
-0.160001 0.160001
-0.150001 0.150001
-0.140001 0.140001
-0.130001 0.130001
-0.120001 0.120001
-0.110001 0.110001
-0.100001 0.100001
-0.090001 0.090001
-0.080001 0.080001
-0.070001 0.070001
-0.060001 0.060001
-0.050001 0.050001
-0.040001 0.040001
-0.030001 0.030001
-0.020001 0.020001
-0.010001 0.010001
-0.000001 0.000001
0.009999 0.009999
0.019999 0.019999
0.029999 0.029999
0.039999 0.039999
0.049999 0.049999
0.059999 0.059999
0.069999 0.069999
0.079999 0.079999
0.089999 0.089999
0.099999 0.099999
0.109999 0.109999
0.119999 0.119999
0.129999 0.129999
0.139999 0.139999
0.149999 0.149999
0.159999 0.159999
0.169999 0.169999
0.179999 0.179999
0.189999 0.189999
0.199999 0.199999
0.209999 0.209999
0.219999 0.219999
0.229999 0.229999
0.239999 0.239999
0.249999 0.249999
0.259999 0.259999
0.269999 0.269999
0.279999 0.279999
0.289999 0.289999
0.299999 0.299999
0.309999 0.309999
0.319999 0.319999
0.329999 0.329999
0.339999 0.339999
0.349999 0.349999
0.359999 0.359999
0.369999 0.369999
0.379999 0.379999
0.389999 0.389999
0.399999 0.399999
0.409999 0.409999
0.419999 0.419999
0.429999 0.429999
0.439999 0.439999
0.449999 0.449999
0.459999 0.459999
0.469999 0.469999
0.479999 0.479999
0.489999 0.489999
0.499999 0.499999
0.509999 0.509999
0.519999 0.519999
0.529999 0.529999
0.539999 0.539999
0.549999 0.549999
0.559999 0.559999
0.569999 0.569999
0.579999 0.579999
0.589999 0.589999
0.599999 0.599999
0.609999 0.609999
0.619999 0.619999
0.629999 0.629999
0.639999 0.639999
0.649999 0.649999
0.659999 0.659999
0.669999 0.669999
0.679999 0.679999
0.689999 0.689999
0.699999 0.699999
0.709999 0.709999
0.719999 0.719999
0.729999 0.729999
0.739999 0.739999
0.749999 0.749999
0.759999 0.759999
0.769999 0.769999
0.779999 0.779999
0.789999 0.789999
0.799999 0.799999
0.809999 0.809999
0.819999 0.819999
0.829999 0.829999
0.839999 0.839999
0.849999 0.849999
0.859999 0.859999
0.869999 0.869999
0.879999 0.879999
0.889999 0.889999
0.899999 0.899999
0.909999 0.909999
0.919999 0.919999
0.929999 0.929999
0.939999 0.939999
0.949998 0.949998
0.959998 0.959998
0.969998 0.969998
0.979998 0.979998
0.989998 0.989998
0.999998 0.999998
-0.990002 0.990002
-0.980002 0.980002
-0.970002 0.970002
-0.960002 0.960002
-0.950002 0.950002
-0.940002 0.940002
-0.930002 0.930002
-0.920002 0.920002
-0.910002 0.910002
-0.900002 0.900002
-0.890002 0.890002
-0.880002 0.880002
-0.870002 0.870002
-0.860002 0.860002
-0.850002 0.850002
-0.840002 0.840002
-0.830002 0.830002
-0.820002 0.820002
-0.810002 0.810002
-0.800002 0.800002
-0.790002 0.790002
-0.780002 0.780002
-0.770002 0.770002
-0.760002 0.760002
-0.750001 0.750001
-0.740001 0.740001
-0.730002 0.730002
-0.720002 0.720002
-0.710002 0.710002
-0.700002 0.700002
-0.690002 0.690002
-0.680002 0.680002
-0.670002 0.670002
-0.660002 0.660002
-0.650002 0.650002
-0.640002 0.640002
-0.630002 0.630002
-0.620002 0.620002
-0.610002 0.610002
-0.600002 0.600002
-0.590002 0.590002
-0.580002 0.580002
-0.570002 0.570002
-0.560002 0.560002
-0.550002 0.550002
-0.540002 0.540002
-0.530002 0.530002
-0.520002 0.520002
-0.510002 0.510002
-0.500002 0.500002
-0.490002 0.490002
-0.480002 0.480002
-0.470002 0.470002
-0.460002 0.460002
-0.450002 0.450002
-0.440002 0.440002
-0.430002 0.430002
-0.420002 0.420002
-0.410002 0.410002
-0.400002 0.400002
-0.390002 0.390002
-0.380002 0.380002
-0.370002 0.370002
-0.360002 0.360002
-0.350002 0.350002
-0.340002 0.340002
-0.330002 0.330002
-0.320002 0.320002
-0.310002 0.310002
-0.300002 0.300002
-0.290002 0.290002
-0.280002 0.280002
-0.270002 0.270002
-0.260002 0.260002
-0.250002 0.250002
-0.240002 0.240002
-0.230002 0.230002
-0.220002 0.220002
-0.210002 0.210002
-0.200002 0.200002
-0.190002 0.190002
-0.180002 0.180002
-0.170002 0.170002
-0.160002 0.160002
-0.150002 0.150002
-0.140002 0.140002
-0.130002 0.130002
-0.120002 0.120002
-0.110002 0.110002
-0.100002 0.100002
-0.090002 0.090002
-0.080002 0.080002
-0.070002 0.070002
-0.060002 0.060002
-0.050002 0.050002
-0.040002 0.040002
-0.030002 0.030002
-0.020002 0.020002
-0.010002 0.010002
-0.000002 0.000002
0.009998 0.009998
0.019998 0.019998
0.029998 0.029998
0.039998 0.039998
0.049998 0.049998
0.059998 0.059998
0.069998 0.069998
0.079998 0.079998
0.089998 0.089998
0.099998 0.099998
0.109998 0.109998
0.119998 0.119998
0.129998 0.129998
0.139998 0.139998
0.149998 0.149998
0.159998 0.159998
0.169998 0.169998
0.179998 0.179998
0.189998 0.189998
0.199998 0.199998
0.209998 0.209998
0.219998 0.219998
0.229998 0.229998
0.239998 0.239998
0.249998 0.249998
0.259998 0.259998
0.269998 0.269998
0.279998 0.279998
0.289998 0.289998
0.299998 0.299998
0.309998 0.309998
0.319998 0.319998
0.329998 0.329998
0.339998 0.339998
0.349998 0.349998
0.359998 0.359998
0.369998 0.369998
0.379997 0.379997
0.389997 0.389997
0.399997 0.399997
0.409997 0.409997
0.419997 0.419997
0.429997 0.429997
0.439997 0.439997
0.449997 0.449997
0.459997 0.459997
0.469997 0.469997
0.479997 0.479997
0.489997 0.489997
0.499997 0.499997
1.000000 1.000000
-1.000000 1.000000
64.000000 64.000000
-64.000000 64.000000
10 changes: 10 additions & 0 deletions tests/abs.0/runstreamer
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
halstreamer << EOF
0
0.25
-0.25
1
-1
64
-64
EOF
14 changes: 6 additions & 8 deletions tests/abs.0/test.hal
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
setexact_for_test_suite_only

loadrt sampler cfg=ff depth=350
loadrt siggen
loadrt streamer cfg=f depth=350
loadrt abs
loadrt threads name1=fast period1=100000

linkpp siggen.0.sawtooth abs.0.in
linksp siggen.0.sawtooth sampler.0.pin.0
linkpp abs.0.out sampler.0.pin.1
net in streamer.0.pin.0 => sampler.0.pin.0 abs.0.in
net out abs.0.out => sampler.0.pin.1

setp siggen.0.frequency 50

addf siggen.0.update fast
addf streamer.0 fast
addf abs.0 fast
addf sampler.0 fast

loadusr -w sh runstreamer
start
loadusr -w halsampler -n 350
loadusr -w halsampler -n 7

0 comments on commit 0333177

Please sign in to comment.