We use the Mocha testing framework.
- The
setup
method gets called before each test. - Set up
@instance_variable
in setup, and use it in tests.
; diamond.s | |
; Usage: | |
; diamond <size> | |
; size is a number from 0 to 300 | |
; If size is greater than 300, 300 will be used | |
; If size is even, size + 1 (odd) will be used | |
; If size contains non-numerical characters, | |
; actual diamond size will be unexpected |
We use the Mocha testing framework.
setup
method gets called before each test.@instance_variable
in setup, and use it in tests.; Copyright 2012 Mitchell Kember. Subject to the MIT license. | |
; ICS3U / 18-Sept-2012 / Daily Assignment | |
; Calculates the area and perimeter of rectangles. | |
; ---------------------------------------- | |
; ------------ READONLY DATA ------------- | |
; ---------------------------------------- | |
section .rodata |
#!/usr/bin/env python3 | |
import fileinput | |
import re | |
import sys | |
def parse(): | |
mode = 'start' | |
prev_line = '' | |
conc_next = False |
#!/usr/bin/env python3 | |
from heapq import heappush, heappop | |
import random | |
# Practice for the final exam | |
### | |
### Algorithms |
drop table if exists course; | |
drop table if exists professor; | |
drop table if exists student; | |
drop table if exists class; | |
drop table if exists enorollment; | |
drop table if exists mark; | |
drop table if exists schedule; | |
create table course ( | |
cnum varchar(5) not null, |
There have been some issues getting everything properly installed for the Scribbler Bot project on OS X. It worked for me the first time because I used Homebrew and pip instead of the .mpkg
installers. I've done this three times now and it has worked every time, so this should work for you too.
All code blocks are meant to be pasted into the Terminal.
Disclaimer: Follow these instructions at your own risk. I promise they won't do anything bad, but I don't guarantee it. I am not responsible for any unintended consequences.
# Usage: gawk --lint=no-ext -f lint.awk docs/concepts/fidl/design-history.md | |
BEGIN { m = 0; } | |
/^## By theme/ { m = 1; next; } | |
m == 1 && /^### / { | |
theme = $2; | |
next_idx[theme] = 0; | |
next; | |
} | |
m == 1 && match($0, /^* .*\[RFC-([0-9]+): ([^]]+)\]\[rfc-([0-9]+)\]/, a) { |
I can't figure out why Guile isn't working. In Racket and Chez, getting the source location of #'e
works fine. In Guile, it seems to convert to strip off the outer syntax information so that it becomes a list of syntax objects.
diff --git a/before-zo.txt b/after-zo.txt | |
index 058332a..63bfaf7 100644 | |
--- a/before-zo.txt | |
+++ b/after-zo.txt | |
@@ -633,3 +633,638 @@ | |
./lib/racket/compiled/usr/local/Cellar/minimal-racket/8.5/share/racket/collects/pkg/private/compiled/install_rkt.zo | |
./lib/racket/compiled/usr/local/Cellar/minimal-racket/8.5/share/racket/collects/pkg/private/compiled/get-info_rkt.zo | |
./lib/racket/compiled/usr/local/Cellar/minimal-racket/8.5/share/racket/collects/pkg/private/compiled/lock_rkt.zo | |
+./share/racket/collects/reader/lang/compiled/reader_rkt.zo | |
+./share/racket/collects/launcher/compiled/launcher_rkt.zo |