Skip to content

Commit

Permalink
Improve tests to check both LLP and RRLP protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-naru committed Mar 27, 2024
1 parent 5b5441e commit a9dbcd9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions spec/gps_pvt/supl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
before{
# skip "SUPL_URI and external ephemeris source (EX_EPH_SRC) are required by ENV" unless ['SUPL_URI', 'EPH_SRC'].all?{|k| ENV[k]}
}
let(:supl_uri){
ENV['SUPL_URI'] || 'supl://supl.google.com/'#?protocol=llp/rrlp'
let(:supl_uri_base){
ENV['SUPL_URI'] || 'supl://supl.google.com/'
}
let(:eph_src){
ENV['EX_EPH_SRC'] || 'ntrip://test%40example.com:none@rtk2go.com:2101/RTCM3EPH'
}
shared_examples "per_url" do
it "can acquire the same ephemeris as the other methods" do
$stderr.print "Connecting #{supl_uri} ..."
agps = URI::parse(supl_uri).open.get_assisted_data
Expand Down Expand Up @@ -132,4 +133,14 @@
Thread::new{rcv.send(func, src_cmp, &proc{})}.join
} rescue nil
end
end

describe "with LPP protocol" do
let(:supl_uri){"#{supl_uri_base}?protocol=lpp"}
include_examples "per_url"
end
describe "with RRLP protocol" do
let(:supl_uri){"#{supl_uri_base}?protocol=rrlp"}
include_examples "per_url"
end
end

0 comments on commit a9dbcd9

Please sign in to comment.