use <cassert> and not <assert.h> in C++
* spot/mc/unionfind.cc, spot/twacube/cube.cc, spot/twacube_algos/convert.cc: Includes code. * tests/sanity/style.test: Add a test for this.
This commit is contained in:
parent
826577c81e
commit
ba0c8e8a29
4 changed files with 11 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2015, 2016, 2018 Laboratoire de Recherche et
|
// Copyright (C) 2015, 2016, 2018, 2021 Laboratoire de Recherche et
|
||||||
// Developpement de l'Epita
|
// Developpement de l'Epita
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <spot/mc/unionfind.hh>
|
#include <spot/mc/unionfind.hh>
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2015, 2016, 2018, 2020 Laboratoire de Recherche et
|
// Copyright (C) 2015, 2016, 2018, 2020, 2021 Laboratoire de Recherche et
|
||||||
// Developpement de l'Epita (LRDE).
|
// Developpement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <spot/twacube/cube.hh>
|
#include <spot/twacube/cube.hh>
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <spot/twacube_algos/convert.hh>
|
#include <spot/twacube_algos/convert.hh>
|
||||||
#include <spot/twaalgos/contains.hh>
|
#include <spot/twaalgos/contains.hh>
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,8 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
||||||
$GREP '#.*include.*[<"]config.h[">]' $tmp &&
|
$GREP '#.*include.*[<"]config.h[">]' $tmp &&
|
||||||
diag 'Do not include config.h in header files.'
|
diag 'Do not include config.h in header files.'
|
||||||
esac
|
esac
|
||||||
|
$GREP '[<"]assert.h[">]' $tmp &&
|
||||||
|
diag 'include <cassert> in C++ files'
|
||||||
;;
|
;;
|
||||||
*.cc)
|
*.cc)
|
||||||
if $GREP 'namespace$' $tmp >/dev/null; then
|
if $GREP 'namespace$' $tmp >/dev/null; then
|
||||||
|
|
@ -346,7 +348,10 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
||||||
else
|
else
|
||||||
diag "*.cc files should include "'"config.h"'
|
diag "*.cc files should include "'"config.h"'
|
||||||
fi;;
|
fi;;
|
||||||
esac;;
|
esac
|
||||||
|
$GREP '[<"]assert.h[">]' $tmp &&
|
||||||
|
diag 'include <cassert> in C++ files'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
case $file in
|
case $file in
|
||||||
*/bin/*|*.cc);;
|
*/bin/*|*.cc);;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue