Merge branch 'master' of https://github.com/trailofbits/deepstate
This commit is contained in:
+26
-28
@@ -30,35 +30,33 @@ TEST(OneOfExample, ProduceSixtyOrHigher) {
|
||||
// Add this back in and uncomment out choices parts below, add
|
||||
// & choices, N to captures, and it becomes quite difficult.
|
||||
|
||||
int N = 0;
|
||||
while (N < LENGTH) {
|
||||
N++;
|
||||
for (int N = 0;N < LENGTH; N++) {
|
||||
OneOf(
|
||||
[&x] {
|
||||
x += 1;
|
||||
printf("-1\n");
|
||||
//choices[N] = '+';
|
||||
},
|
||||
[&x] {
|
||||
x -= 1;
|
||||
printf("+1\n");
|
||||
//choices[N] = '-';
|
||||
},
|
||||
[&x] {
|
||||
x *= 2;
|
||||
printf("*2\n");
|
||||
//choices[N] = '2';
|
||||
},
|
||||
[&x] {
|
||||
x += 10;
|
||||
printf("+=10\n");
|
||||
//choices[N] = 'x';
|
||||
},
|
||||
[&x] {
|
||||
x = 0;
|
||||
printf("=0\n");
|
||||
//choices[N] = '0';
|
||||
});
|
||||
[&x] {
|
||||
x += 1;
|
||||
printf("+=1\n");
|
||||
//choices[N] = '+';
|
||||
},
|
||||
[&x] {
|
||||
x -= 1;
|
||||
printf("-=1\n");
|
||||
//choices[N] = '-';
|
||||
},
|
||||
[&x] {
|
||||
x *= 2;
|
||||
printf("*2\n");
|
||||
//choices[N] = '2';
|
||||
},
|
||||
[&x] {
|
||||
x += 10;
|
||||
printf("+=10\n");
|
||||
//choices[N] = 'x';
|
||||
},
|
||||
[&x] {
|
||||
x = 0;
|
||||
printf("=0\n");
|
||||
//choices[N] = '0';
|
||||
});
|
||||
|
||||
//choices[N+1] = 0;
|
||||
ASSERT_LE(x, 60)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <deepstate/DeepState.hpp>
|
||||
|
||||
/*
|
||||
TEST(Streaming, BasicLevels) {
|
||||
LOG(DEBUG) << "This is a debug message";
|
||||
LOG(INFO) << "This is an info message";
|
||||
@@ -32,11 +32,12 @@ TEST(Streaming, BasicTypes) {
|
||||
LOG(INFO) << "string";
|
||||
LOG(INFO) << nullptr;
|
||||
}
|
||||
|
||||
*/
|
||||
TEST(Formatting, OverridePrintf) {
|
||||
printf("hello string=%s hex_lower=%x hex_upper=%X octal=%o char=%c dec=%d"
|
||||
"double=%f sci=%e SCI=%E pointer=%p",
|
||||
"world", 999, 999, 999, 'a', 999, 999.0, 999.0, 999.0, "world");
|
||||
printf("hello again!");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
Reference in New Issue
Block a user