Summary: This diff `#define`s the functions to which `assert` compiles to `abort`. This enables the analyzer to report assertion violations, and is independent of platform. Also add a simple test to check that it is detected correctly. Reviewed By: ngorogiannis Differential Revision: D27564870 fbshipit-source-id: 5517ca910master
parent
6dab0ee459
commit
5c3c89a964
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void main() {
|
||||
int x, y;
|
||||
assert(x != y);
|
||||
}
|
Loading…
Reference in new issue