2017-08-28 09:56:43 +00:00
|
|
|
//@ aux-build:three-equals.rs
|
2018-03-20 18:20:03 +00:00
|
|
|
|
2017-08-28 09:56:43 +00:00
|
|
|
extern crate three_equals;
|
|
|
|
|
|
|
|
use three_equals::three_equals;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// This one is okay.
|
|
|
|
three_equals!(===);
|
|
|
|
|
|
|
|
// Need exactly three equals.
|
2017-11-20 12:13:27 +00:00
|
|
|
three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3
|
2017-08-28 09:56:43 +00:00
|
|
|
|
|
|
|
// Need exactly three equals.
|
2017-11-20 12:13:27 +00:00
|
|
|
three_equals!(=====); //~ ERROR expected EOF
|
2017-08-28 09:56:43 +00:00
|
|
|
|
|
|
|
// Only equals accepted.
|
2017-11-20 12:13:27 +00:00
|
|
|
three_equals!(abc); //~ ERROR expected `=`
|
2017-08-28 09:56:43 +00:00
|
|
|
|
|
|
|
// Only equals accepted.
|
2017-11-20 12:13:27 +00:00
|
|
|
three_equals!(!!); //~ ERROR expected `=`
|
2017-08-28 09:56:43 +00:00
|
|
|
|
|
|
|
// Only three characters expected.
|
2017-11-20 12:13:27 +00:00
|
|
|
three_equals!(===a); //~ ERROR expected EOF
|
2017-08-28 09:56:43 +00:00
|
|
|
}
|