Skip to content

Commit d442d8b

Browse files
committed
Add dedicated test data for library without examples
Previously, tests that needed a library without examples used a library that just happened to not have examples for test data. Using test data specifically intended to provide the necessary conditions will result in less fragile tests.
1 parent 12170ff commit d442d8b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

check/checkfunctions/library_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func TestMisspelledExamplesFolderName(t *testing.T) {
346346
testTables := []libraryCheckFunctionTestTable{
347347
{"Correctly spelled", "ExamplesFolder", checkresult.Pass, ""},
348348
{"Misspelled", "MisspelledExamplesFolder", checkresult.Fail, ""},
349-
{"No examples folder", "Recursive", checkresult.Pass, ""},
349+
{"No examples folder", "NoExamples", checkresult.Pass, ""},
350350
}
351351

352352
checkLibraryCheckFunction(MisspelledExamplesFolderName, testTables, t)
@@ -356,7 +356,7 @@ func TestIncorrectExamplesFolderNameCase(t *testing.T) {
356356
testTables := []libraryCheckFunctionTestTable{
357357
{"Correct case", "ExamplesFolder", checkresult.Pass, ""},
358358
{"Incorrect case", "IncorrectExamplesFolderCase", checkresult.Fail, ""},
359-
{"No examples folder", "Recursive", checkresult.Pass, ""},
359+
{"No examples folder", "NoExamples", checkresult.Pass, ""},
360360
}
361361

362362
checkLibraryCheckFunction(IncorrectExamplesFolderNameCase, testTables, t)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=NoExamples
2+
version=1.0.0
3+
author=Cristian Maglie <[email protected]>, Pippo Pluto <[email protected]>
4+
maintainer=Cristian Maglie <[email protected]>
5+
sentence=A library that makes coding a web server a breeze.
6+
paragraph=Supports HTTP1.1 and you can do GET and POST.
7+
category=Communication
8+
url=http://example.com/
9+
architectures=avr

check/checkfunctions/testdata/libraries/NoExamples/src/NoExamples.h

Whitespace-only changes.

0 commit comments

Comments
 (0)