Add support for a default_bearing_radius flag (#6575)

This commit is contained in:
Whytro
2023-03-25 00:49:33 +09:00
committed by GitHub
parent d6afe91d8f
commit d51631401e
19 changed files with 95 additions and 34 deletions
+12
View File
@@ -112,6 +112,18 @@ test('constructor: throws if dataset_name is not a string', function(assert) {
assert.throws(function() { new OSRM({dataset_name: "unsued_name___", shared_memory: true}); }, /Could not find shared memory region/, 'Does not accept wrong name');
});
test('constructor: takes a default_radius argument', function(assert) {
assert.plan(1);
var osrm = new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 1});
assert.ok(osrm);
});
test('constructor: throws if default_radius is not a number', function(assert) {
assert.plan(2);
assert.throws(function() { new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 'abc'}); }, /default_radius must be an integral number/, 'Does not accept string');
assert.ok(new OSRM({algorithm: 'MLD', path: monaco_mld_path, default_radius: 1}), 'Does accept number');
});
test('constructor: parses custom limits', function(assert) {
assert.plan(1);
var osrm = new OSRM({