trackler 2.2.1.161 → 2.2.1.162

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b43c5ab9a8adbe36a8157bf0d03a0f4bd4bbc684
4
- data.tar.gz: 4109587f611e9fd046523c3c7efd0a5f6238f6d9
3
+ metadata.gz: 3b0f3914ed0507205511f5d2b4c3cf1216af589b
4
+ data.tar.gz: dc3375041de356a74a5c00d445b4206c948aba60
5
5
  SHA512:
6
- metadata.gz: 13df901f2b0606aa96041dab598e441b5b846c88548917f2a877a7313e32ba6094eb15073646871a9966e33e9f2ee0854983fb20658341fcf5cd09f052e84c28
7
- data.tar.gz: 7f8088e21b6c7351d45b1726fec99632032e0d0a365aaed9ec2085998378ca78883c7072d9cf40b86ea4d17deac200bac2d7e8fda04c127c74f0514be0544d44
6
+ metadata.gz: 563678d4ddf4f37de1d3103ce49c59744bfe20ae6a11ae45db829df3fff8586315f51912edea14dcd468f0cf6933f468eec555d3521f8036e1a297309f36236c
7
+ data.tar.gz: 879532e919e270cc49831f1c225f981c68067a866d8b5ad5d22ca3bbcf9a3a702f3e6a2db6c34dba00b320215f1d37d9cc9df6209c4935d905ddcaddc1834a60
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.161"
2
+ VERSION = "2.2.1.162"
3
3
  end
data/tracks/c/config.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "slug": "hello-world",
8
8
  "uuid": "ee307061-5bc2-439c-8815-abd730aedc2d",
9
9
  "core": true,
10
+ "auto_approve": true,
10
11
  "unlocked_by": null,
11
12
  "difficulty": 1,
12
13
  "topics": [
@@ -62,3 +62,9 @@ char **annotate(const char **minefield, const size_t rows)
62
62
 
63
63
  return annotated;
64
64
  }
65
+
66
+ void free_annotation(char **annotation)
67
+ {
68
+ free(annotation[0]);
69
+ free(annotation);
70
+ }
@@ -3,5 +3,6 @@
3
3
  #include <stddef.h>
4
4
 
5
5
  char **annotate(const char **minefield, const size_t rows);
6
+ void free_annotation(char **annotation);
6
7
 
7
8
  #endif
@@ -12,12 +12,6 @@ void tearDown(void)
12
12
  {
13
13
  }
14
14
 
15
- static void free_all(char **field)
16
- {
17
- free(field[0]);
18
- free(field);
19
- }
20
-
21
15
  void test_annotate_no_rows(void)
22
16
  {
23
17
  const char **minefield = NULL;
@@ -36,7 +30,7 @@ void test_annotate_no_columns(void)
36
30
  const size_t rows = ARRAY_SIZE(expected);
37
31
  char **actual = annotate(minefield, rows);
38
32
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
39
- free_all(actual);
33
+ free_annotation(actual);
40
34
  }
41
35
 
42
36
  void test_annotate_no_mines(void)
@@ -55,7 +49,7 @@ void test_annotate_no_mines(void)
55
49
  const size_t rows = ARRAY_SIZE(expected);
56
50
  char **actual = annotate(minefield, rows);
57
51
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
58
- free_all(actual);
52
+ free_annotation(actual);
59
53
  }
60
54
 
61
55
  void test_annotate_minefield_with_only_mines(void)
@@ -74,7 +68,7 @@ void test_annotate_minefield_with_only_mines(void)
74
68
  const size_t rows = ARRAY_SIZE(expected);
75
69
  char **actual = annotate(minefield, rows);
76
70
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
77
- free_all(actual);
71
+ free_annotation(actual);
78
72
  }
79
73
 
80
74
  void test_annotate_mine_surrounded_by_spaces(void)
@@ -93,7 +87,7 @@ void test_annotate_mine_surrounded_by_spaces(void)
93
87
  const size_t rows = ARRAY_SIZE(expected);
94
88
  char **actual = annotate(minefield, rows);
95
89
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
96
- free_all(actual);
90
+ free_annotation(actual);
97
91
  }
98
92
 
99
93
  void test_annotate_space_surrounded_by_mines(void)
@@ -112,7 +106,7 @@ void test_annotate_space_surrounded_by_mines(void)
112
106
  const size_t rows = ARRAY_SIZE(expected);
113
107
  char **actual = annotate(minefield, rows);
114
108
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
115
- free_all(actual);
109
+ free_annotation(actual);
116
110
  }
117
111
 
118
112
  void test_annotate_horizontal_line(void)
@@ -127,7 +121,7 @@ void test_annotate_horizontal_line(void)
127
121
  const size_t rows = ARRAY_SIZE(expected);
128
122
  char **actual = annotate(minefield, rows);
129
123
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
130
- free_all(actual);
124
+ free_annotation(actual);
131
125
  }
132
126
 
133
127
  void test_annotate_horizontal_line_mines_at_edges(void)
@@ -142,7 +136,7 @@ void test_annotate_horizontal_line_mines_at_edges(void)
142
136
  const size_t rows = ARRAY_SIZE(expected);
143
137
  char **actual = annotate(minefield, rows);
144
138
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
145
- free_all(actual);
139
+ free_annotation(actual);
146
140
  }
147
141
 
148
142
  void test_annotate_vertical_line(void)
@@ -165,7 +159,7 @@ void test_annotate_vertical_line(void)
165
159
  const size_t rows = ARRAY_SIZE(expected);
166
160
  char **actual = annotate(minefield, rows);
167
161
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
168
- free_all(actual);
162
+ free_annotation(actual);
169
163
  }
170
164
 
171
165
  void test_annotate_vertical_line_mines_at_edges(void)
@@ -188,7 +182,7 @@ void test_annotate_vertical_line_mines_at_edges(void)
188
182
  const size_t rows = ARRAY_SIZE(expected);
189
183
  char **actual = annotate(minefield, rows);
190
184
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
191
- free_all(actual);
185
+ free_annotation(actual);
192
186
  }
193
187
 
194
188
  void test_annotate_cross(void)
@@ -211,7 +205,7 @@ void test_annotate_cross(void)
211
205
  const size_t rows = ARRAY_SIZE(expected);
212
206
  char **actual = annotate(minefield, rows);
213
207
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
214
- free_all(actual);
208
+ free_annotation(actual);
215
209
  }
216
210
 
217
211
  void test_annotate_large_minefield(void)
@@ -236,7 +230,7 @@ void test_annotate_large_minefield(void)
236
230
  const size_t rows = ARRAY_SIZE(expected);
237
231
  char **actual = annotate(minefield, rows);
238
232
  TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, rows);
239
- free_all(actual);
233
+ free_annotation(actual);
240
234
  }
241
235
 
242
236
  int main(void)
@@ -6,7 +6,7 @@
6
6
 
7
7
  // results structure
8
8
  typedef struct word_count_word {
9
- char text[MAX_WORD_LENGTH];
9
+ char text[MAX_WORD_LENGTH + 1]; // allow for the string to be null-terminated
10
10
  int count;
11
11
  } word_count_word_t;
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1.161
4
+ version: 2.2.1.162
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen