void testValues() { f = 2; char buf1[] = "1"; //@ assert \valid(buf1+(0..\block_length(buf1)-1)); //@ assert \exists integer x; buf1[x] == '\0'; char buf2[] = "2"; //@ assert \valid(buf2+(0..\block_length(buf2)-1)); //@ assert \exists integer x; buf2[x] == '\0'; struct strbuf databuf; databuf.buf = buf1; databuf.len = 2; struct strbuf ctlbuf; ctlbuf.buf = buf2; ctlbuf.len = 2; putpmsg(anyint(), &ctlbuf, &databuf, anyint(), anyint()); //@ assert f == 2; //@ assert vacuous: \false; }
void runSuccess1() { char buf[] = "s"; //@ assert \valid(buf+(0..\block_length(buf)-1)); //@ assert \exists integer x; buf[x] == '\0'; struct strbuf ctlbuf; ctlbuf.buf = buf; ctlbuf.len = 2; putpmsg(anyint(), &ctlbuf, NULL, anyint(), anyint()); }
void runFailure1() { char buf[] = "s"; //@ assert \valid(buf+(0..\block_length(buf)-1)); //@ assert \exists integer x; buf[x] == '\0'; struct strbuf databuf; databuf.buf = buf; databuf.len = 9001; putpmsg(anyint(), NULL, &databuf, anyint(), anyint()); }
JNIEXPORT jint JNICALL Java_streamsJNI_putpmsg(JNIEnv *jenv, jclass jcls, jint jarg1, jlong jarg2, jlong jarg3, jint jarg4, jint jarg5) { jint jresult = 0 ; int arg1 ; struct strbuf *arg2 = (struct strbuf *) 0 ; struct strbuf *arg3 = (struct strbuf *) 0 ; int arg4 ; int arg5 ; int result; (void)jenv; (void)jcls; arg1 = (int)jarg1; arg2 = *(struct strbuf **)&jarg2; arg3 = *(struct strbuf **)&jarg3; arg4 = (int)jarg4; arg5 = (int)jarg5; result = (int)putpmsg(arg1,(struct strbuf const *)arg2,(struct strbuf const *)arg3,arg4,arg5); jresult = (jint)result; return jresult; }
void runSuccess3() { char buf1[] = "1"; //@ assert \valid(buf1+(0..\block_length(buf1)-1)); //@ assert \exists integer x; buf1[x] == '\0'; char buf2[] = "2"; //@ assert \valid(buf2+(0..\block_length(buf2)-1)); //@ assert \exists integer x; buf2[x] == '\0'; struct strbuf databuf; databuf.buf = buf1; databuf.len = 2; struct strbuf ctlbuf; ctlbuf.buf = buf2; ctlbuf.len = 2; putpmsg(anyint(), &ctlbuf, &databuf, anyint(), anyint()); }
void runSuccess() { putpmsg(anyint(), NULL, NULL, anyint(), anyint()); }