-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into remove-unused-assert-option
- Loading branch information
Showing
61 changed files
with
880 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
format: | ||
tab_size: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
# Copyright 2018 Uber Technologies, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
# Support code for wrapping tests or other executables with Valgrind. | ||
|
||
if(__test_wrap_valgrind) | ||
return() | ||
return() | ||
endif() | ||
set(__test_wrap_valgrind 1) | ||
|
||
include(CMakeDependentOption) | ||
|
||
find_program(VALGRIND valgrind) | ||
cmake_dependent_option(WRAP_VALGRIND "Wrap tests in valgrind" OFF | ||
"VALGRIND" OFF) | ||
cmake_dependent_option(WRAP_VALGRIND "Wrap tests in valgrind" OFF "VALGRIND" | ||
OFF) | ||
if(WRAP_VALGRIND) | ||
# TEST_WRAPPER could be used to configure the Valgrind parameters, or | ||
# to use a different wrapper entirely. | ||
set(TEST_WRAPPER ${VALGRIND} --track-origins=yes --leak-check=full --error-exitcode=99 CACHE STRING | ||
"Wrapper executable for tests and benchmarks") | ||
# TEST_WRAPPER could be used to configure the Valgrind parameters, or to use | ||
# a different wrapper entirely. | ||
set(TEST_WRAPPER | ||
${VALGRIND} --track-origins=yes --leak-check=full --error-exitcode=99 | ||
CACHE STRING "Wrapper executable for tests and benchmarks") | ||
mark_as_advanced(TEST_WRAPPER) | ||
# Convert from semicolon separated list of values to a form | ||
# that can be used by a shell. | ||
# Convert from semicolon separated list of values to a form that can be used | ||
# by a shell. | ||
string(REPLACE ";" " " TEST_WRAPPER_STR "${TEST_WRAPPER}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
add_h3_cli_test(testCliAreNeighborCells "areNeighborCells -o 85283473fffffff -d 85283477fffffff" "true") | ||
add_h3_cli_test(testCliAreNotNeighborCells "areNeighborCells -o 85283473fffffff -d 85283472fffffff" "false") | ||
add_h3_cli_test(testCliAreNeighborNotCells "areNeighborCells -o 85283473fffffff -d 852834727fffffff 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test(testCliAreNeighborCells | ||
"areNeighborCells -o 85283473fffffff -d 85283477fffffff" "true") | ||
add_h3_cli_test( | ||
testCliAreNotNeighborCells | ||
"areNeighborCells -o 85283473fffffff -d 85283472fffffff" "false") | ||
add_h3_cli_test( | ||
testCliAreNeighborNotCells | ||
"areNeighborCells -o 85283473fffffff -d 852834727fffffff 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
add_h3_cli_test(testCliCellAreaKm2 "cellAreaKm2 -c 85283473fffffff" "265.0925581283") | ||
add_h3_cli_test(testCliNotCellAreaKm2 "cellAreaKm2 -c 115283473fffffff 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test(testCliCellAreaKm2 "cellAreaKm2 -c 85283473fffffff" | ||
"265.0925581283") | ||
add_h3_cli_test(testCliNotCellAreaKm2 "cellAreaKm2 -c 115283473fffffff 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
add_h3_cli_test(testCliCellAreaM2 "cellAreaM2 -c 85283473fffffff | xargs printf '%.3f'" "265092558.128") | ||
add_h3_cli_test(testCliNotCellAreaM2 "cellAreaM2 -c 115283473fffffff 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test( | ||
testCliCellAreaM2 "cellAreaM2 -c 85283473fffffff | xargs printf '%.3f'" | ||
"265092558.128") | ||
add_h3_cli_test(testCliNotCellAreaM2 "cellAreaM2 -c 115283473fffffff 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
add_h3_cli_test(testCliCellAreaRads2 "cellAreaRads2 -c 85283473fffffff" "0.0000065310") | ||
add_h3_cli_test(testCliNotCellAreaRads2 "cellAreaRads2 -c 115283473fffffff 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test(testCliCellAreaRads2 "cellAreaRads2 -c 85283473fffffff" | ||
"0.0000065310") | ||
add_h3_cli_test( | ||
testCliNotCellAreaRads2 "cellAreaRads2 -c 115283473fffffff 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
add_h3_cli_test(testCliCellToBoundary "cellToBoundary -c 8928342e20fffff -f wkt" "POLYGON((-122.4990471431 37.4997389893, -122.4979805011 37.5014245698, -122.4992373065 37.5029321860, -122.5015607527 37.5027541980, -122.5026273256 37.5010686174, -122.5013705214 37.4995610248, -122.4990471431 37.4997389893))") | ||
add_h3_cli_test( | ||
testCliCellToBoundary | ||
"cellToBoundary -c 8928342e20fffff -f wkt" | ||
"POLYGON((-122.4990471431 37.4997389893, -122.4979805011 37.5014245698, -122.4992373065 37.5029321860, -122.5015607527 37.5027541980, -122.5026273256 37.5010686174, -122.5013705214 37.4995610248, -122.4990471431 37.4997389893))" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
add_h3_cli_test(testCliCellToCenterChild "cellToCenterChild -c 85283473fffffff --resolution 7 -f newline" "872834700ffffff") | ||
add_h3_cli_test( | ||
testCliCellToCenterChild | ||
"cellToCenterChild -c 85283473fffffff --resolution 7 -f newline" | ||
"872834700ffffff") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_h3_cli_test(testCliCellToChildPos "cellToChildPos -c 85283473fffffff -r 3" "25") | ||
add_h3_cli_test(testCliCellToChildPos "cellToChildPos -c 85283473fffffff -r 3" | ||
"25") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
add_h3_cli_test(testCliCellToChildren "cellToChildren -c 85283473fffffff -r 6" "[ \"862834707ffffff\", \"86283470fffffff\", \"862834717ffffff\", \"86283471fffffff\", \"862834727ffffff\", \"86283472fffffff\", \"862834737ffffff\" ]") | ||
add_h3_cli_test( | ||
testCliCellToChildren | ||
"cellToChildren -c 85283473fffffff -r 6" | ||
"[ \"862834707ffffff\", \"86283470fffffff\", \"862834717ffffff\", \"86283471fffffff\", \"862834727ffffff\", \"86283472fffffff\", \"862834737ffffff\" ]" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_h3_cli_test(testCliCellToChildrenSize "cellToChildrenSize -c 85283473fffffff -r 6" "7") | ||
add_h3_cli_test(testCliCellToChildrenSize | ||
"cellToChildrenSize -c 85283473fffffff -r 6" "7") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
add_h3_cli_test(testCliCellToLatLng "cellToLatLng -c 8928342e20fffff -f wkt" "POINT(-122.5003039349 37.5012466151)") | ||
add_h3_cli_test(testCliInvalidCellToLatLng "cellToLatLng -c asdf 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test(testCliCellToLatLng "cellToLatLng -c 8928342e20fffff -f wkt" | ||
"POINT(-122.5003039349 37.5012466151)") | ||
add_h3_cli_test(testCliInvalidCellToLatLng "cellToLatLng -c asdf 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
add_h3_cli_test(testCliCellToLocalIj "cellToLocalIj -o 85283473fffffff -c 8528342bfffffff" "[25, 13]") | ||
add_h3_cli_test( | ||
testCliCellToLocalIj "cellToLocalIj -o 85283473fffffff -c 8528342bfffffff" | ||
"[25, 13]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
add_h3_cli_test(testCliCellToParent "cellToParent -c 8928342e20fffff --resolution 3 -f newline" "832834fffffffff") | ||
add_h3_cli_test( | ||
testCliCellToParent | ||
"cellToParent -c 8928342e20fffff --resolution 3 -f newline" | ||
"832834fffffffff") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
add_h3_cli_test(testCliCellToVertex "cellToVertex -c 85283473fffffff -v 0 -f newline" "22528340bfffffff") | ||
add_h3_cli_test(testCliNotCellToVertex "cellToVertex -c 115283473fffffff -v 0 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test( | ||
testCliCellToVertex "cellToVertex -c 85283473fffffff -v 0 -f newline" | ||
"22528340bfffffff") | ||
add_h3_cli_test( | ||
testCliNotCellToVertex "cellToVertex -c 115283473fffffff -v 0 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
add_h3_cli_test(testCliCellToVertexes "cellToVertexes -c 85283473fffffff" "[ \"22528340bfffffff\", \"235283447fffffff\", \"205283463fffffff\", \"255283463fffffff\", \"22528340ffffffff\", \"23528340bfffffff\" ]") | ||
add_h3_cli_test(testCliNotCellToVertexes "cellToVertexes -c 115283473fffffff 2>&1" "Error 5: Cell argument was not valid") | ||
add_h3_cli_test( | ||
testCliCellToVertexes | ||
"cellToVertexes -c 85283473fffffff" | ||
"[ \"22528340bfffffff\", \"235283447fffffff\", \"205283463fffffff\", \"255283463fffffff\", \"22528340ffffffff\", \"23528340bfffffff\" ]" | ||
) | ||
add_h3_cli_test( | ||
testCliNotCellToVertexes "cellToVertexes -c 115283473fffffff 2>&1" | ||
"Error 5: Cell argument was not valid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
add_h3_cli_test(testCliCellsToDirectedEdge "cellsToDirectedEdge -o 85283473fffffff -d 85283477fffffff -f newline" "115283473fffffff") | ||
add_h3_cli_test(testCliCellsNotToDirectedEdge "cellsToDirectedEdge -o 85283473fffffff -d 85283472fffffff 2>&1" "Error 11: Cell arguments were not neighbors") | ||
add_h3_cli_test( | ||
testCliCellsToDirectedEdge | ||
"cellsToDirectedEdge -o 85283473fffffff -d 85283477fffffff -f newline" | ||
"115283473fffffff") | ||
add_h3_cli_test( | ||
testCliCellsNotToDirectedEdge | ||
"cellsToDirectedEdge -o 85283473fffffff -d 85283472fffffff 2>&1" | ||
"Error 11: Cell arguments were not neighbors") |
Oops, something went wrong.