| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | 
							- include(${CMAKE_CURRENT_LIST_DIR}/json.cmake)
 
- if (NOT IS_DIRECTORY "${v1}/data/content")
 
-   add_error("Custom content directory does not exist.")
 
- endif()
 
- file(GLOB content_files ${v1}/data/content/*)
 
- list(LENGTH content_files num)
 
- if (NOT ${num} EQUAL 2)
 
-   add_error("Found ${num} custom content files, expected 2.")
 
- endif()
 
- # Check contents of configureContent files
 
- set(firstFile "")
 
- foreach(content_file IN LISTS content_files)
 
-   read_json("${content_file}" contents)
 
-   json_assert_key("${content_file}" "${contents}" myString "string")
 
-   json_assert_key("${content_file}" "${contents}" myBool "OFF")
 
-   json_assert_key("${content_file}" "${contents}" myInt "1")
 
-   json_assert_key("${content_file}" "${contents}" myFloat "2.5")
 
-   json_assert_key("${content_file}" "${contents}" myTrue "ON")
 
-   json_assert_key("${content_file}" "${contents}" myList "[ \"a\", \"b\", \"c\" ]")
 
-   json_assert_key("${content_file}" "${contents}" myObject "{.*\"key\".*:.*\"value\".*}")
 
-   if (NOT firstFile)
 
-     set(firstFile "${content_file}")
 
-   endif()
 
-   if ("${content_file}" STREQUAL "${firstFile}")
 
-     string(JSON firstN GET "${contents}" nConfigure)
 
-   else()
 
-     string(JSON secondN GET "${contents}" nConfigure)
 
-   endif()
 
- endforeach()
 
- # Ensure provided -DN=* arguments result in differing JSON contents
 
- math(EXPR expectedSecondN "3-${firstN}")
 
- if (NOT ${secondN} EQUAL ${expectedSecondN})
 
-   add_error("Configure content did not correspond to provided cache variables.\nGot: ${firstN} and ${secondN}")
 
- endif()
 
- # Ensure snippets reference valid files
 
- foreach(snippet IN LISTS snippets)
 
-   read_json("${snippet}" contents)
 
-   string(JSON filename GET "${contents}" configureContent)
 
-   if (NOT EXISTS "${v1}/data/${filename}")
 
-     add_error("Reference to content file that does not exist.")
 
-   endif()
 
- endforeach()
 
 
  |