Skip to content

Instantly share code, notes, and snippets.

from test import multibytecodec_support
import unittest
# Inlining t5 makes the test pass
t5 = multibytecodec_support.TestBase_Mapping
class TestGB18030Map(t5, unittest.TestCase):
encoding = 'gb18030'
mapfileurl = 'http://www.pythontest.net/unicode/gb-18030-2000.xml'
t7 = __name__ == "__main__"
pragma options "--bnd-inline-amnt 5 --bnd-inbits 2 --bnd-cbits 3 ";
int BASE = 4;
int[2*N] mult(int N, int[N] x, int[N] y){
int[2*N] out = 0;
for(int i=0; i<N; ++i){
for(int j=0; j<N; ++j){
@jkoppel
jkoppel / java_samples.java
Created October 16, 2016 01:42
Test cases from hell
/* Original samples:
Sample 7:
Query rangeQuery(String field, Object lowerTerm, Object upperTerm,
boolean includeLower, boolean includeUpper) {
double l = Double.NEGATIVE_INFINITY;
double u = Double.POSITIVE_INFINITY;
if (lowerTerm != null) {
l = parse(lowerTerm);
// Version 1: Prints "1"
function foo() {
x = 1;
}
foo();
console.log(x);
//------------------------------------