bin: detect overflows in conversion functions
* bin/common_conv.cc (to_int, to_unsigned): Here. * bin/common_range.cc (parse_range): And there. * tests/core/ltlgrind.test, tests/core/genaut.test, tests/core/randaut.test: Add test cases.
This commit is contained in:
parent
05edab3f5a
commit
96c3972c5c
5 changed files with 41 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2018, 2020, 2022 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
# Copyright (C) 2014-2018, 2020, 2022, 2023 Laboratoire de Recherche
|
||||
# et Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
|
|
@ -29,6 +29,9 @@ grep "randaut: 3.1.*is not between 0 and 1 (in argument of -e" err
|
|||
randaut -n1a 3 2>err && exit 1
|
||||
grep "randaut: failed to parse '1a' as an integer.* -n/--automata)" err
|
||||
|
||||
randaut -n99999999999999999999999999 3 2>err && exit 1
|
||||
grep "randaut:.*too large" err
|
||||
|
||||
randaut --spin -Q4 a b | ../ikwiad -H -XN - >out
|
||||
grep 'States: 4' out
|
||||
grep 'AP: 2' out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue