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 -*-
|
||||
// Copyright (C) 2015, 2016, 2018 Laboratoire de Recherche et
|
||||
// Copyright (C) 2015, 2016, 2018, 2021 Laboratoire de Recherche et
|
||||
// Developpement de l'Epita
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include <spot/mc/unionfind.hh>
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- 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).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <spot/twacube/cube.hh>
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include "config.h"
|
||||
#include <spot/twacube_algos/convert.hh>
|
||||
#include <spot/twaalgos/contains.hh>
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
|
|||
|
|
@ -327,6 +327,8 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
|||
$GREP '#.*include.*[<"]config.h[">]' $tmp &&
|
||||
diag 'Do not include config.h in header files.'
|
||||
esac
|
||||
$GREP '[<"]assert.h[">]' $tmp &&
|
||||
diag 'include <cassert> in C++ files'
|
||||
;;
|
||||
*.cc)
|
||||
if $GREP 'namespace$' $tmp >/dev/null; then
|
||||
|
|
@ -346,7 +348,10 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
|||
else
|
||||
diag "*.cc files should include "'"config.h"'
|
||||
fi;;
|
||||
esac;;
|
||||
esac
|
||||
$GREP '[<"]assert.h[">]' $tmp &&
|
||||
diag 'include <cassert> in C++ files'
|
||||
;;
|
||||
esac
|
||||
case $file in
|
||||
*/bin/*|*.cc);;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue