Skip to content

Instantly share code, notes, and snippets.

/2sat-j.bash
Created Apr 4, 2011

Embed
What would you like to do?
Braindead 2sat test script
echo "Test 1: Should be 0 1 1 0"
./jconsole 2sat.ijs <<EOF
4 5
1 2
2 3
3 4
-1 -3
-2 -4
EOF
echo "Done"
echo "Test 2: Should be UNSOLVABLE"
./jconsole 2sat.ijs <<EOF
2 4
1 2
-1 2
-2 1
-1 -2
EOF
echo "Done"
echo "Test 3: Should be 0 1"
./jconsole 2sat.ijs <<EOF
2 4
1 2
-1 2
2 -1
-1 -2
EOF
echo "Done"
echo "Test 4: Should be:"
cat <<EOF
1 1 1 1 1 1 0 0
0 1 0 1 1 0 1 0
0 1 0 1 1 1 1 0
EOF
echo "Is:"
./jconsole 2sat.ijs <<EOF
8 12
1 4
-2 5
3 7
2 -5
-8 -2
3 -1
4 -3
5 -4
-3 -7
6 7
1 7
-7 -1
EOF
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.