about summary refs log tree commit diff stats
path: root/cpp/013arithmetic
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-13 17:57:30 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-13 17:57:30 -0700
commitf7051fadd90af17820df750d448dc35ea63690e3 (patch)
tree90e0a42805cc74938c3ebb2c4437edf81137a666 /cpp/013arithmetic
parent781f24623374b5657cec6e408549d2a74ec94399 (diff)
downloadmu-f7051fadd90af17820df750d448dc35ea63690e3.tar.gz
901
Diffstat (limited to 'cpp/013arithmetic')
-rw-r--r--cpp/013arithmetic5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/013arithmetic b/cpp/013arithmetic
index d1d61eed..846fdff3 100644
--- a/cpp/013arithmetic
+++ b/cpp/013arithmetic
@@ -3,6 +3,7 @@
 const int ADD = 2;
 :(before "End Primitive Recipe Numbers")
 Recipe_number["add"] = ADD;
+assert(Next_recipe_number == ADD);
 Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case ADD: {
@@ -47,6 +48,7 @@ recipe main [
 const int SUBTRACT = 3;
 :(before "End Primitive Recipe Numbers")
 Recipe_number["subtract"] = SUBTRACT;
+assert(Next_recipe_number == SUBTRACT);
 Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case SUBTRACT: {
@@ -91,6 +93,7 @@ recipe main [
 const int MULTIPLY = 4;
 :(before "End Primitive Recipe Numbers")
 Recipe_number["multiply"] = MULTIPLY;
+assert(Next_recipe_number == MULTIPLY);
 Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case MULTIPLY: {
@@ -136,6 +139,7 @@ recipe main [
 const int DIVIDE = 5;
 :(before "End Primitive Recipe Numbers")
 Recipe_number["divide"] = DIVIDE;
+assert(Next_recipe_number == DIVIDE);
 Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case DIVIDE: {
@@ -181,6 +185,7 @@ recipe main [
 const int DIVIDE_WITH_REMAINDER = 6;
 :(before "End Primitive Recipe Numbers")
 Recipe_number["divide_with_remainder"] = DIVIDE_WITH_REMAINDER;
+assert(Next_recipe_number == DIVIDE_WITH_REMAINDER);
 Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case DIVIDE_WITH_REMAINDER: {