trackler 2.2.1.43 → 2.2.1.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/lens-person/description.md +1 -1
  4. data/problem-specifications/exercises/palindrome-products/description.md +5 -12
  5. data/problem-specifications/exercises/pascals-triangle/canonical-data.json +1 -7
  6. data/tracks/c/exercises/meetup/src/example.c +64 -60
  7. data/tracks/c/exercises/meetup/src/example.h +2 -2
  8. data/tracks/c/exercises/meetup/test/test_meetup.c +4 -4
  9. data/tracks/cfml/config.json +179 -169
  10. data/tracks/cfml/exercises/markdown/.meta/HINTS.md +0 -0
  11. data/tracks/cfml/exercises/markdown/Markdown.cfc +121 -0
  12. data/tracks/cfml/exercises/markdown/MarkdownTest.cfc +51 -0
  13. data/tracks/cfml/exercises/markdown/Solution.cfc +204 -0
  14. data/tracks/cfml/exercises/markdown/SolutionTest.cfc +7 -0
  15. data/tracks/cfml/exercises/markdown/TestRunner.cfc +103 -0
  16. data/tracks/cfml/exercises/markdown/box.json +8 -0
  17. data/tracks/cfml/exercises/markdown/index.cfm +37 -0
  18. data/tracks/csharp/exercises/dominoes/DominoesTest.cs +40 -45
  19. data/tracks/csharp/exercises/meetup/MeetupTest.cs +761 -83
  20. data/tracks/csharp/generators/Exercises/Dominoes.cs +33 -0
  21. data/tracks/csharp/generators/Exercises/Meetup.cs +46 -0
  22. data/tracks/csharp/generators/Output/FormattingExtensions.cs +11 -1
  23. data/tracks/csharp/generators/Output/TypesExtensions.cs +23 -0
  24. data/tracks/csharp/generators/Output/ValueFormatter.cs +70 -69
  25. data/tracks/dart/config.json +15 -3
  26. data/tracks/dart/exercises/word-count/README.md +18 -0
  27. data/tracks/dart/exercises/word-count/lib/example.dart +26 -0
  28. data/tracks/dart/exercises/word-count/lib/word_count.dart +3 -0
  29. data/tracks/dart/exercises/word-count/pubspec.lock +293 -0
  30. data/tracks/dart/exercises/word-count/pubspec.yaml +3 -0
  31. data/tracks/dart/exercises/word-count/test/word_count_test.dart +64 -0
  32. data/tracks/ecmascript/docs/INSTALLATION.md +4 -7
  33. data/tracks/elixir/exercises/hello-world/README.md +1 -26
  34. data/tracks/elixir/exercises/hello-world/example.exs +3 -7
  35. data/tracks/elixir/exercises/hello-world/hello_world.exs +3 -25
  36. data/tracks/elixir/exercises/hello-world/hello_world_test.exs +2 -13
  37. data/tracks/elixir/mix.lock +1 -1
  38. data/tracks/elm/config.json +11 -0
  39. data/tracks/elm/exercises/pascals-triangle/README.md +51 -0
  40. data/tracks/elm/exercises/pascals-triangle/Triangle.elm +1 -0
  41. data/tracks/elm/exercises/pascals-triangle/Triangle.example.elm +23 -0
  42. data/tracks/elm/exercises/pascals-triangle/elm-package.json +14 -0
  43. data/tracks/elm/exercises/pascals-triangle/package.json +14 -0
  44. data/tracks/elm/exercises/pascals-triangle/tests/Tests.elm +34 -0
  45. data/tracks/elm/exercises/pascals-triangle/tests/elm-package.json +16 -0
  46. data/tracks/fsharp/exercises/grade-school/GradeSchool.fs +2 -2
  47. data/tracks/fsharp/exercises/grade-school/GradeSchoolTest.fs +3 -2
  48. data/tracks/java/CONTRIBUTING.md +34 -0
  49. data/tracks/java/config.json +42 -6
  50. data/tracks/java/exercises/largest-series-product/src/main/java/LargestSeriesProductCalculator.java +7 -3
  51. data/tracks/java/exercises/matrix/src/main/java/Matrix.java +23 -0
  52. data/tracks/julia/config.json +11 -2
  53. data/tracks/julia/exercises/grains/README.md +33 -0
  54. data/tracks/julia/exercises/grains/example.jl +23 -0
  55. data/tracks/julia/exercises/grains/grains.jl +9 -0
  56. data/tracks/julia/exercises/grains/runtests.jl +27 -0
  57. data/tracks/lua/README.md +1 -1
  58. data/tracks/mips/exercises/octal/README.md +3 -8
  59. data/tracks/ocaml/exercises/palindrome-products/README.md +8 -14
  60. data/tracks/perl6/.travis.yml +7 -3
  61. data/tracks/perl6/bin/exercise-gen.pl6 +5 -1
  62. data/tracks/perl6/exercises/accumulate/README.md +0 -3
  63. data/tracks/perl6/exercises/accumulate/accumulate.t +9 -3
  64. data/tracks/perl6/exercises/all-your-base/README.md +1 -1
  65. data/tracks/perl6/exercises/all-your-base/all-your-base.t +23 -11
  66. data/tracks/perl6/exercises/all-your-base/example.yaml +1 -1
  67. data/tracks/perl6/exercises/allergies/README.md +0 -1
  68. data/tracks/perl6/exercises/allergies/allergies.t +22 -10
  69. data/tracks/perl6/exercises/anagram/anagram.t +22 -10
  70. data/tracks/perl6/exercises/atbash-cipher/README.md +2 -1
  71. data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +22 -10
  72. data/tracks/perl6/exercises/binary/README.md +2 -0
  73. data/tracks/perl6/exercises/bob/bob.t +24 -11
  74. data/tracks/perl6/exercises/bob/example.yaml +2 -2
  75. data/tracks/perl6/exercises/clock/clock.t +22 -10
  76. data/tracks/perl6/exercises/flatten-array/README.md +1 -2
  77. data/tracks/perl6/exercises/flatten-array/example.yaml +1 -1
  78. data/tracks/perl6/exercises/flatten-array/flatten-array.t +23 -11
  79. data/tracks/perl6/exercises/grade-school/README.md +0 -1
  80. data/tracks/perl6/exercises/grade-school/grade-school.t +9 -3
  81. data/tracks/perl6/exercises/grains/README.md +0 -1
  82. data/tracks/perl6/exercises/grains/grains.t +22 -10
  83. data/tracks/perl6/exercises/hello-world/example.yaml +3 -3
  84. data/tracks/perl6/exercises/hello-world/hello-world.t +25 -12
  85. data/tracks/perl6/exercises/leap/README.md +1 -1
  86. data/tracks/perl6/exercises/leap/example.yaml +1 -1
  87. data/tracks/perl6/exercises/leap/leap.t +23 -11
  88. data/tracks/perl6/exercises/linked-list/README.md +10 -10
  89. data/tracks/perl6/exercises/linked-list/linked-list.t +9 -3
  90. data/tracks/perl6/exercises/luhn/README.md +7 -7
  91. data/tracks/perl6/exercises/luhn/luhn.t +22 -10
  92. data/tracks/perl6/exercises/phone-number/README.md +3 -2
  93. data/tracks/perl6/exercises/phone-number/phone-number.t +22 -10
  94. data/tracks/perl6/exercises/raindrops/raindrops.t +22 -10
  95. data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +22 -10
  96. data/tracks/perl6/exercises/robot-name/robot-name.t +9 -3
  97. data/tracks/perl6/exercises/scrabble-score/README.md +3 -1
  98. data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +22 -10
  99. data/tracks/perl6/exercises/space-age/README.md +2 -1
  100. data/tracks/perl6/exercises/space-age/space-age.t +22 -10
  101. data/tracks/perl6/exercises/trinary/README.md +1 -1
  102. data/tracks/perl6/exercises/word-count/README.md +1 -2
  103. data/tracks/perl6/exercises/word-count/word-count.t +22 -10
  104. data/tracks/perl6/exercises/wordy/README.md +0 -5
  105. data/tracks/perl6/exercises/wordy/wordy.t +22 -10
  106. data/tracks/perl6/templates/test.mustache +26 -15
  107. data/tracks/python/config.json +10 -0
  108. data/tracks/python/exercises/book-store/book_store.py +1 -1
  109. data/tracks/python/exercises/flatten-array/flatten_array.py +1 -1
  110. data/tracks/python/exercises/matrix/matrix.py +1 -1
  111. data/tracks/python/exercises/palindrome-products/palindrome_products.py +2 -2
  112. data/tracks/python/exercises/perfect-numbers/perfect_numbers.py +2 -2
  113. data/tracks/python/exercises/pythagorean-triplet/pythagorean_triplet.py +3 -3
  114. data/tracks/python/exercises/raindrops/raindrops.py +1 -1
  115. data/tracks/python/exercises/scale-generator/scale_generator.py +1 -1
  116. data/tracks/python/exercises/sieve/sieve.py +1 -1
  117. data/tracks/python/exercises/sublist/sublist.py +1 -1
  118. data/tracks/python/exercises/transpose/transpose.py +1 -1
  119. data/tracks/python/exercises/triangle/triangle.py +4 -1
  120. data/tracks/python/exercises/two-bucket/example.py +59 -0
  121. data/tracks/python/exercises/two-bucket/two_bucket.py +2 -0
  122. data/tracks/python/exercises/two-bucket/two_bucket_test.py +32 -0
  123. data/tracks/scheme/config.json +59 -89
  124. data/tracks/scheme/config/maintainers.json +11 -11
  125. data/tracks/sml/exercises/allergies/README.md +20 -5
  126. data/tracks/sml/exercises/allergies/allergies.sml +11 -14
  127. data/tracks/sml/exercises/allergies/example.sml +9 -9
  128. data/tracks/sml/exercises/allergies/test.sml +65 -129
  129. data/tracks/sml/exercises/allergies/testlib.sml +159 -0
  130. data/tracks/sml/exercises/hamming/README.md +21 -5
  131. data/tracks/sml/exercises/hamming/example.sml +14 -10
  132. data/tracks/sml/exercises/hamming/hamming.sml +4 -3
  133. data/tracks/sml/exercises/hamming/test.sml +55 -64
  134. data/tracks/sml/exercises/hamming/testlib.sml +159 -0
  135. data/tracks/typescript/config.json +15 -0
  136. data/tracks/typescript/exercises/linked-list/linked-list.test.ts +11 -11
  137. data/tracks/typescript/exercises/nth-prime/README.md +36 -0
  138. data/tracks/typescript/exercises/nth-prime/nth-prime.example.ts +28 -0
  139. data/tracks/typescript/exercises/nth-prime/nth-prime.test.ts +25 -0
  140. data/tracks/typescript/exercises/nth-prime/nth-prime.ts +0 -0
  141. data/tracks/typescript/exercises/nth-prime/package.json +36 -0
  142. data/tracks/typescript/exercises/nth-prime/tsconfig.json +22 -0
  143. data/tracks/typescript/exercises/nth-prime/tslint.json +127 -0
  144. data/tracks/typescript/exercises/nth-prime/yarn.lock +2305 -0
  145. data/tracks/typescript/exercises/prime-factors/README.md +1 -1
  146. data/tracks/typescript/exercises/prime-factors/prime-factors.test.ts +11 -11
  147. data/tracks/typescript/exercises/series/README.md +1 -1
  148. data/tracks/typescript/exercises/series/series.test.ts +11 -11
  149. data/tracks/typescript/img/icon.png +0 -0
  150. data/tracks/typescript/img/icon.svg +3 -8
  151. metadata +44 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34df3f47653a28428d9f5588ab2f351e03a061d8
4
- data.tar.gz: c8a16096a4baaa4da33666a818d1f7ab231e3934
3
+ metadata.gz: 714ae73cefc7a2a7e1951109345f0990d0965f43
4
+ data.tar.gz: 0ba267cd29b36ca834b159d90b915015260f77f5
5
5
  SHA512:
6
- metadata.gz: 4fcb85a26186da30f62ffbe241a7ee2f5dd79bb577948a23e1edbe871765eb17a295336d7504d796254ad71630dc0b92387e2c2ce526d38fb4f0bc44e098c1cb
7
- data.tar.gz: c3ec3d29c0520e8de6a8cfd0330671d0eecebeeed90bfdfeaf041ea2cae79fa5280703df38eaee744cb62cceea96393cc8dbda4494c435c37ab185abad46a366
6
+ metadata.gz: 84549ff0c9b5ec4287fe2f4fae35d22f2ffcd8cc8bd5441bae7a255bdaa7667cde0947a9c623a22d8447bda433c07fe56bf3ab17c7c3c34a372ac71781f3378a
7
+ data.tar.gz: 29834346cd14bf9bed64b0843c918eeb78277e8f7424664a00ac1a7cd14220c32526c1496c9ca8b0951153ea251f739f28d64710450488b67a6ba6c6302b757b
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.43"
2
+ VERSION = "2.2.1.44"
3
3
  end
@@ -3,5 +3,5 @@ Use lenses to update nested records (specific to languages with immutable data).
3
3
  Updating fields of nested records is kind of annoying in Haskell. One solution
4
4
  is to use [lenses](https://wiki.haskell.org/Lens). Implement several record
5
5
  accessing functions using lenses, you may use any library you want. The test
6
- suite also allows you to avoid lenses alltogether so you can experiment with
6
+ suite also allows you to avoid lenses altogether so you can experiment with
7
7
  different approaches.
@@ -3,19 +3,12 @@ Detect palindrome products in a given range.
3
3
  A palindromic number is a number that remains the same when its digits are
4
4
  reversed. For example, `121` is a palindromic number but `112` is not.
5
5
 
6
- Given the definition of a palindromic number, we define a palindrome _product_
7
- to be the product `c`, such that `a * b = c`, where `c` is a palindromic number and
8
- `a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers).
6
+ Given a range of numbers, find the largest and smallest palindromes which
7
+ are products of numbers within that range.
9
8
 
10
- For example, the palindromic number 9009 can be written as the palindrome
11
- product: `91 * 99 = 9009`.
12
-
13
- It's possible (and indeed common) for a palindrome product to be the product
14
- of multiple combinations of numbers. For example, the palindrome product `9` has
15
- the factors `(1, 9)` and `(3, 3)`.
16
-
17
- Write a program that given a range of integers, returns the smallest and largest
18
- palindromic product of factors within that range, along with all the factors in the range for that product.
9
+ Your solution should return the largest and smallest palindromes, along with the
10
+ factors of each within the range. If the largest or smallest palindrome has more
11
+ than one pair of factors within the range, then return all the pairs.
19
12
 
20
13
  ## Example 1
21
14
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "pascals-triangle",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "Expectations are represented here as an array of arrays.",
6
6
  "How you represent this idiomatically in your language is up to you.",
@@ -45,12 +45,6 @@
45
45
  "property": "rows",
46
46
  "count": -1,
47
47
  "expected": -1
48
- },
49
- {
50
- "description": "null/no rows",
51
- "property": "rows",
52
- "count": null,
53
- "expected": -1
54
48
  }
55
49
  ]
56
50
  }
@@ -8,70 +8,71 @@
8
8
  typedef struct {
9
9
  const char *text;
10
10
  int number;
11
- } TextToIntLookup_t;
11
+ } text_to_int_lookup_t;
12
12
 
13
- static bool isLeapyear(int year)
13
+ static bool is_leap_year(int year)
14
14
  {
15
15
  return ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0));
16
16
  }
17
17
 
18
- static int daysInMonth(int year, int month)
18
+ static int days_in_month(int year, int month)
19
19
  {
20
- int numberOfDays = 31;
20
+ int number_of_days = 31;
21
21
 
22
22
  switch (month) {
23
23
  case 4:
24
24
  case 6:
25
25
  case 9:
26
26
  case 11:
27
- numberOfDays = 30;
27
+ number_of_days = 30;
28
28
  break;
29
29
  case 2:
30
- if (isLeapyear(year)) {
31
- numberOfDays = 29;
30
+ if (is_leap_year(year)) {
31
+ number_of_days = 29;
32
32
  } else {
33
- numberOfDays = 28;
33
+ number_of_days = 28;
34
34
  }
35
35
  break;
36
36
  }
37
- return numberOfDays;
37
+ return number_of_days;
38
38
  }
39
39
 
40
- static int getNumberGivenText(const char *text, TextToIntLookup_t * lookup,
41
- size_t numberEntries)
40
+ static int get_number_given_text(const char *text,
41
+ text_to_int_lookup_t * lookup,
42
+ size_t number_entries)
42
43
  {
43
- int matchNumber = -1;
44
+ int match_number = -1;
44
45
 
45
- for (size_t index = 0; index < numberEntries; index++) {
46
+ for (size_t index = 0; index < number_entries; index++) {
46
47
  if (0 == strcmp(text, lookup[index].text)) {
47
- matchNumber = lookup[index].number;
48
+ match_number = lookup[index].number;
48
49
  break;
49
50
  }
50
51
  }
51
- return matchNumber;
52
+ return match_number;
52
53
  }
53
54
 
54
- static int getDayOfWeekFromDate(unsigned int year, unsigned int month,
55
- unsigned int day)
55
+ static int get_day_of_week_from_date(unsigned int year, unsigned int month,
56
+ unsigned int day)
56
57
  {
57
- struct tm firstDayOfTestMonth;
58
- time_t midnightFirstDayofTestMonth;
59
-
60
- firstDayOfTestMonth.tm_year = year - 1900;
61
- firstDayOfTestMonth.tm_mon = month - 1;
62
- firstDayOfTestMonth.tm_mday = day;
63
- firstDayOfTestMonth.tm_hour = 0;
64
- firstDayOfTestMonth.tm_min = 0;
65
- firstDayOfTestMonth.tm_sec = 0;
66
- firstDayOfTestMonth.tm_isdst = 0;
67
- midnightFirstDayofTestMonth = mktime(&firstDayOfTestMonth);
68
-
69
- return (localtime(&midnightFirstDayofTestMonth)->tm_wday);
58
+ struct tm first_day_of_test_month;
59
+ time_t midnight_first_day_of_test_month;
60
+
61
+ first_day_of_test_month.tm_year = year - 1900;
62
+ first_day_of_test_month.tm_mon = month - 1;
63
+ first_day_of_test_month.tm_mday = day;
64
+ first_day_of_test_month.tm_hour = 0;
65
+ first_day_of_test_month.tm_min = 0;
66
+ first_day_of_test_month.tm_sec = 0;
67
+ first_day_of_test_month.tm_isdst = 0;
68
+ midnight_first_day_of_test_month = mktime(&first_day_of_test_month);
69
+
70
+ return (localtime(&midnight_first_day_of_test_month)->tm_wday);
70
71
  }
71
72
 
72
- static int getWeekOfMonth(const char *week)
73
+ static int get_week_of_month(const char *week)
73
74
  {
74
- TextToIntLookup_t whichWeekOfMonthLookup[] = {
75
+ text_to_int_lookup_t which_week_of_month_lookup[] = {
75
76
  {"first", 1},
76
77
  {"second", 2},
77
78
  {"third", 3},
@@ -81,14 +82,14 @@ static int getWeekOfMonth(const char *week)
81
82
  {"teenth", 7}
82
83
  };
83
84
 
84
- return getNumberGivenText(week, &whichWeekOfMonthLookup[0],
85
- sizeof(whichWeekOfMonthLookup) /
86
- sizeof(TextToIntLookup_t));
85
+ return get_number_given_text(week, &which_week_of_month_lookup[0],
86
+ sizeof(which_week_of_month_lookup) /
87
+ sizeof(text_to_int_lookup_t));
87
88
  }
88
89
 
89
- static int getRequestedDayOfWeek(const char *dayOfWeek)
90
+ static int get_requested_day_of_week(const char *day_of_week)
90
91
  {
91
- TextToIntLookup_t dayLookup[] = {
92
+ text_to_int_lookup_t day_lookup[] = {
92
93
  {"Sunday", 0},
93
94
  {"Monday", 1},
94
95
  {"Tuesday", 2},
@@ -98,42 +99,45 @@ static int getRequestedDayOfWeek(const char *dayOfWeek)
98
99
  {"Saturday", 6}
99
100
  };
100
101
 
101
- return getNumberGivenText(dayOfWeek, &dayLookup[0],
102
- sizeof(dayLookup) / sizeof(TextToIntLookup_t));
102
+ return get_number_given_text(day_of_week, &day_lookup[0],
103
+ sizeof(day_lookup) /
104
+ sizeof(text_to_int_lookup_t));
103
105
  }
104
106
 
105
- int meetupDayOfMonth(unsigned int year, unsigned int month, const char *week,
106
- const char *dayOfWeek)
107
+ int meetup_day_of_month(unsigned int year, unsigned int month, const char *week,
108
+ const char *day_of_week)
107
109
  {
108
- int dayOfMonth = BAD_DATE_REQUESTED;
109
- int baselineDayOfWeek;
110
- int daysInTestMonth = daysInMonth(year, month);
111
- int dayOffset;
112
- int referenceDay = 1; // used to calculate a baseline day of week given a target date.
110
+ int day_of_month = BAD_DATE_REQUESTED;
111
+ int baseline_day_of_week;
112
+ int days_in_test_month = days_in_month(year, month);
113
+ int day_offset;
114
+ int reference_day = 1; // used to calculate a baseline day of week given a target date.
113
115
 
114
- int whichWeekOfMonth = getWeekOfMonth(week);
115
- int targetDayInWeek = getRequestedDayOfWeek(dayOfWeek);
116
+ int which_week_of_month = get_week_of_month(week);
117
+ int target_day_in_week = get_requested_day_of_week(day_of_week);
116
118
 
117
119
  // check for valid lookup...
118
- if ((whichWeekOfMonth >= 0) && (targetDayInWeek >= 0)) {
120
+ if ((which_week_of_month >= 0) && (target_day_in_week >= 0)) {
119
121
  // first - fifth Xday of month
120
- if (whichWeekOfMonth <= 5) {
121
- dayOffset = 1 + ((whichWeekOfMonth - 1) * 7);
122
+ if (which_week_of_month <= 5) {
123
+ day_offset = 1 + ((which_week_of_month - 1) * 7);
122
124
  } else {
123
125
  // code for last Xday of month
124
- if (6 == whichWeekOfMonth) {
125
- referenceDay = daysInTestMonth - 6; // use the last unique day near end of month as reference
126
+ if (6 == which_week_of_month) {
127
+ reference_day = days_in_test_month - 6; // use the last unique day near end of month as reference
126
128
  } else {
127
- referenceDay = 13; // use first teenth day as reference
129
+ reference_day = 13; // use first teenth day as reference
128
130
  }
129
- dayOffset = referenceDay;
131
+ day_offset = reference_day;
130
132
  }
131
- baselineDayOfWeek = getDayOfWeekFromDate(year, month, referenceDay);
132
- dayOfMonth = dayOffset + ((targetDayInWeek + 7 - baselineDayOfWeek) % 7);
133
+ baseline_day_of_week =
134
+ get_day_of_week_from_date(year, month, reference_day);
135
+ day_of_month =
136
+ day_offset + ((target_day_in_week + 7 - baseline_day_of_week) % 7);
133
137
  }
134
138
 
135
- if (dayOfMonth > daysInTestMonth) {
136
- dayOfMonth = BAD_DATE_REQUESTED;
139
+ if (day_of_month > days_in_test_month) {
140
+ day_of_month = BAD_DATE_REQUESTED;
137
141
  }
138
- return dayOfMonth;
142
+ return day_of_month;
139
143
  }
@@ -1,7 +1,7 @@
1
1
  #ifndef MEETUP_H
2
2
  #define MEETUP_H
3
3
 
4
- int meetupDayOfMonth(unsigned int year, unsigned int month, const char *week,
5
- const char *dayOfWeek);
4
+ int meetup_day_of_month(unsigned int year, unsigned int month, const char *week,
5
+ const char *day_of_week);
6
6
 
7
7
  #endif
@@ -2,18 +2,18 @@
2
2
  #include "../src/meetup.h"
3
3
 
4
4
  // Using XMacros to create the tests
5
- #define EXPAND_MEETUP_TEST_AS_TEST(test_name, year, month, week, dayOfWeek, dayOfMonth)\
5
+ #define EXPAND_MEETUP_TEST_AS_TEST(test_name, year, month, week, day_of_week, day_of_month_expected)\
6
6
  void test_name(void)\
7
7
  {\
8
- int actualDayOfMonth = meetupDayOfMonth(year, month, week, dayOfWeek);\
8
+ int actual_day_of_month = meetup_day_of_month(year, month, week, day_of_week);\
9
9
  \
10
- TEST_ASSERT_EQUAL_INT(dayOfMonth, actualDayOfMonth);\
10
+ TEST_ASSERT_EQUAL_INT(day_of_month_expected, actual_day_of_month);\
11
11
  }\
12
12
 
13
13
 
14
14
  // below expands to multiple routines...that are all designed to test the returned day of month
15
15
  // the fields are:
16
- // text - test name, int year, int month, char *week, char *dayofWeek, int dayOfMonthExpecte (0=invalid)
16
+ // text - test name, int year, int month, char *week, char *day_of_week, int day_of_month_expected (0=invalid)
17
17
 
18
18
  #define MEETUP_TESTS(ENTRY) \
19
19
  ENTRY(test_monteenth_of_May_2013, 2013, 5, "teenth", "Monday", 13)\
@@ -1,169 +1,179 @@
1
- {
2
- "active": true,
3
- "blurb": "CFML (ColdFusion Markup Language) is an open source and commercial (JIT) compiled dynamic and loosely typed JVM scripting language that embodies classic OO, and functional programming, making it easy to learn, fun to use. CFML brings the power and scalability of the J2EE ecosystem but without the boilerplate of Java.",
4
- "exercises": [
5
- {
6
- "difficulty": 1,
7
- "slug": "hello-world",
8
- "topics": null,
9
- "uuid": "ab04a390-0969-4a17-8081-c852b23ed88c"
10
- },
11
- {
12
- "core": false,
13
- "difficulty": 1,
14
- "slug": "leap",
15
- "topics": null,
16
- "unlocked_by": null,
17
- "uuid": "03a98e5b-03b7-45e5-a580-611ef5dab4e5"
18
- },
19
- {
20
- "difficulty": 1,
21
- "slug": "raindrops",
22
- "topics": null,
23
- "uuid": "9273C0A7-CB7E-4F3F-8993-F1621CE1F700"
24
- },
25
- {
26
- "difficulty": 1,
27
- "slug": "scrabble-score",
28
- "topics": null,
29
- "uuid": "1065F8DF-E6C6-4473-A633-4FA4B49A5314"
30
- },
31
- {
32
- "difficulty": 1,
33
- "slug": "difference-of-squares",
34
- "topics": null,
35
- "uuid": "4E91AD44-8F3D-40DC-899E-253C91B134F6"
36
- },
37
- {
38
- "difficulty": 1,
39
- "slug": "secret-handshake",
40
- "topics": null,
41
- "uuid": "0AC79782-B370-4954-8455-6300A734E1B8"
42
- },
43
- {
44
- "difficulty": 1,
45
- "slug": "space-age",
46
- "topics": null,
47
- "uuid": "0B14F23A-DAD4-4965-8ABD-8A107DFD6C00"
48
- },
49
- {
50
- "difficulty": 1,
51
- "slug": "acronym",
52
- "topics": null,
53
- "uuid": "9894F2F7-2DBE-4001-885B-FD2C029C6731"
54
- },
55
- {
56
- "difficulty": 1,
57
- "slug": "rna-transcription",
58
- "topics": null,
59
- "uuid": "11C48AFF-4A54-4B3C-AF5E-53048D4BA98B"
60
- },
61
- {
62
- "difficulty": 1,
63
- "slug": "pangram",
64
- "topics": null,
65
- "uuid": "113A2FF7-E72E-49DD-A2CF-0EB25894707D"
66
- },
67
- {
68
- "difficulty": 1,
69
- "slug": "hamming",
70
- "topics": null,
71
- "uuid": "4063A554-424C-4173-81EE-FEAC7CC51E8A"
72
- },
73
- {
74
- "difficulty": 1,
75
- "slug": "gigasecond",
76
- "topics": null,
77
- "uuid": "00B82E7F-804C-4401-BB7F-0565DEA02567"
78
- },
79
- {
80
- "difficulty": 1,
81
- "slug": "sum-of-multiples",
82
- "topics": null,
83
- "uuid": "C6F38ACB-A6BD-41EE-A2F8-A9680B3F61D2"
84
- },
85
- {
86
- "difficulty": 1,
87
- "slug": "luhn",
88
- "topics": null,
89
- "uuid": "685ADB7B-1DC9-4409-993D-51034DF6F744"
90
- },
91
- {
92
- "difficulty": 1,
93
- "slug": "triangle",
94
- "topics": null,
95
- "uuid": "8D0FA71A-3314-432E-BF1F-E6A5F823FC36"
96
- },
97
- {
98
- "difficulty": 1,
99
- "slug": "largest-series-product",
100
- "topics": null,
101
- "uuid": "A35C9BE1-F26A-40C8-8C05-99C33C552E6F"
102
- },
103
- {
104
- "difficulty": 1,
105
- "slug": "grains",
106
- "topics": null,
107
- "uuid": "E25686EE-B888-4533-86C2-5A5D96F5270E"
108
- },
109
- {
110
- "difficulty": 1,
111
- "slug": "atbash-cipher",
112
- "topics": null,
113
- "uuid": "C35391BD-900F-4756-8DFE-A96EA04250F8"
114
- },
115
- {
116
- "difficulty": 1,
117
- "slug": "nth-prime",
118
- "topics": null,
119
- "uuid": "15151E41-195C-40DD-B296-C2C19B38CAEA"
120
- },
121
- {
122
- "difficulty": 1,
123
- "slug": "pig-latin",
124
- "topics": null,
125
- "uuid": "3FDDA0E3-AE90-4834-B6DC-A5E367A5A029"
126
- },
127
- {
128
- "difficulty": 1,
129
- "slug": "flatten-array",
130
- "topics": null,
131
- "uuid": "B0E72A09-49E2-4973-BFF4-88C678F4BE55"
132
- },
133
- {
134
- "difficulty": 1,
135
- "slug": "saddle-points",
136
- "topics": null,
137
- "uuid": "063C4BB9-3280-4C69-B164-237732AE00EF"
138
- },
139
- {
140
- "difficulty": 1,
141
- "slug": "diamond",
142
- "topics": null,
143
- "uuid": "DECA4C79-DA5D-43A8-90B8-3A5BE73EAFF5"
144
- },
145
- {
146
- "difficulty": 1,
147
- "slug": "isogram",
148
- "topics": null,
149
- "uuid": "FC8922A3-E29D-451D-9947-A2781C0FF787"
150
- },
151
- {
152
- "difficulty": 1,
153
- "slug": "bob",
154
- "topics": null,
155
- "uuid": "12BBECF4-93EB-40F2-AC13-8CF28B550F0A"
156
- },
157
- {
158
- "difficulty": 1,
159
- "slug": "word-count",
160
- "topics": null,
161
- "uuid": "C61E97BE-6C66-4F1F-87ED-D21C4ED2A8E2"
162
- }
163
- ],
164
- "foregone": [],
165
- "ignore_pattern": "Solution",
166
- "language": "CFML",
167
- "solution_pattern": "Solution.cfc",
168
- "test_pattern": "Test.cfc"
169
- }
1
+ {
2
+ "active":true,
3
+ "blurb":"CFML (ColdFusion Markup Language) is an open source and commercial (JIT) compiled dynamic and loosely typed JVM scripting language that embodies classic OO, and functional programming, making it easy to learn, fun to use. CFML brings the power and scalability of the J2EE ecosystem but without the boilerplate of Java.",
4
+ "exercises":[
5
+ {
6
+ "difficulty":1,
7
+ "slug":"hello-world",
8
+ "topics":null,
9
+ "uuid":"ab04a390-0969-4a17-8081-c852b23ed88c"
10
+ },
11
+ {
12
+ "core":false,
13
+ "difficulty":1,
14
+ "slug":"leap",
15
+ "topics":null,
16
+ "unlocked_by":null,
17
+ "uuid":"03a98e5b-03b7-45e5-a580-611ef5dab4e5"
18
+ },
19
+ {
20
+ "difficulty":1,
21
+ "slug":"raindrops",
22
+ "topics":null,
23
+ "uuid":"9273C0A7-CB7E-4F3F-8993-F1621CE1F700"
24
+ },
25
+ {
26
+ "difficulty":1,
27
+ "slug":"scrabble-score",
28
+ "topics":null,
29
+ "uuid":"1065F8DF-E6C6-4473-A633-4FA4B49A5314"
30
+ },
31
+ {
32
+ "difficulty":1,
33
+ "slug":"difference-of-squares",
34
+ "topics":null,
35
+ "uuid":"4E91AD44-8F3D-40DC-899E-253C91B134F6"
36
+ },
37
+ {
38
+ "difficulty":1,
39
+ "slug":"secret-handshake",
40
+ "topics":null,
41
+ "uuid":"0AC79782-B370-4954-8455-6300A734E1B8"
42
+ },
43
+ {
44
+ "difficulty":1,
45
+ "slug":"space-age",
46
+ "topics":null,
47
+ "uuid":"0B14F23A-DAD4-4965-8ABD-8A107DFD6C00"
48
+ },
49
+ {
50
+ "difficulty":1,
51
+ "slug":"acronym",
52
+ "topics":null,
53
+ "uuid":"9894F2F7-2DBE-4001-885B-FD2C029C6731"
54
+ },
55
+ {
56
+ "difficulty":1,
57
+ "slug":"rna-transcription",
58
+ "topics":null,
59
+ "uuid":"11C48AFF-4A54-4B3C-AF5E-53048D4BA98B"
60
+ },
61
+ {
62
+ "difficulty":1,
63
+ "slug":"pangram",
64
+ "topics":null,
65
+ "uuid":"113A2FF7-E72E-49DD-A2CF-0EB25894707D"
66
+ },
67
+ {
68
+ "difficulty":1,
69
+ "slug":"hamming",
70
+ "topics":null,
71
+ "uuid":"4063A554-424C-4173-81EE-FEAC7CC51E8A"
72
+ },
73
+ {
74
+ "difficulty":1,
75
+ "slug":"gigasecond",
76
+ "topics":null,
77
+ "uuid":"00B82E7F-804C-4401-BB7F-0565DEA02567"
78
+ },
79
+ {
80
+ "difficulty":1,
81
+ "slug":"sum-of-multiples",
82
+ "topics":null,
83
+ "uuid":"C6F38ACB-A6BD-41EE-A2F8-A9680B3F61D2"
84
+ },
85
+ {
86
+ "difficulty":1,
87
+ "slug":"luhn",
88
+ "topics":null,
89
+ "uuid":"685ADB7B-1DC9-4409-993D-51034DF6F744"
90
+ },
91
+ {
92
+ "difficulty":1,
93
+ "slug":"triangle",
94
+ "topics":null,
95
+ "uuid":"8D0FA71A-3314-432E-BF1F-E6A5F823FC36"
96
+ },
97
+ {
98
+ "difficulty":1,
99
+ "slug":"largest-series-product",
100
+ "topics":null,
101
+ "uuid":"A35C9BE1-F26A-40C8-8C05-99C33C552E6F"
102
+ },
103
+ {
104
+ "difficulty":1,
105
+ "slug":"grains",
106
+ "topics":null,
107
+ "uuid":"E25686EE-B888-4533-86C2-5A5D96F5270E"
108
+ },
109
+ {
110
+ "difficulty":1,
111
+ "slug":"atbash-cipher",
112
+ "topics":null,
113
+ "uuid":"C35391BD-900F-4756-8DFE-A96EA04250F8"
114
+ },
115
+ {
116
+ "difficulty":1,
117
+ "slug":"nth-prime",
118
+ "topics":null,
119
+ "uuid":"15151E41-195C-40DD-B296-C2C19B38CAEA"
120
+ },
121
+ {
122
+ "difficulty":1,
123
+ "slug":"pig-latin",
124
+ "topics":null,
125
+ "uuid":"3FDDA0E3-AE90-4834-B6DC-A5E367A5A029"
126
+ },
127
+ {
128
+ "difficulty":1,
129
+ "slug":"flatten-array",
130
+ "topics":null,
131
+ "uuid":"B0E72A09-49E2-4973-BFF4-88C678F4BE55"
132
+ },
133
+ {
134
+ "difficulty":1,
135
+ "slug":"saddle-points",
136
+ "topics":null,
137
+ "uuid":"063C4BB9-3280-4C69-B164-237732AE00EF"
138
+ },
139
+ {
140
+ "difficulty":1,
141
+ "slug":"diamond",
142
+ "topics":null,
143
+ "uuid":"DECA4C79-DA5D-43A8-90B8-3A5BE73EAFF5"
144
+ },
145
+ {
146
+ "difficulty":1,
147
+ "slug":"isogram",
148
+ "topics":null,
149
+ "uuid":"FC8922A3-E29D-451D-9947-A2781C0FF787"
150
+ },
151
+ {
152
+ "difficulty":1,
153
+ "slug":"bob",
154
+ "topics":null,
155
+ "uuid":"12BBECF4-93EB-40F2-AC13-8CF28B550F0A"
156
+ },
157
+ {
158
+ "difficulty":1,
159
+ "slug":"word-count",
160
+ "topics":null,
161
+ "uuid":"C61E97BE-6C66-4F1F-87ED-D21C4ED2A8E2"
162
+ },
163
+ {
164
+ "difficulty":5,
165
+ "slug":"markdown",
166
+ "uuid":"4594B907-8080-4A23-AD06-BE85FC28D088",
167
+ "topics":[
168
+
169
+ ]
170
+ }
171
+ ],
172
+ "foregone":[
173
+
174
+ ],
175
+ "ignore_pattern":"Solution",
176
+ "language":"CFML",
177
+ "solution_pattern":"Solution.cfc",
178
+ "test_pattern":"Test.cfc"
179
+ }