Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/02.API-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6425,7 +6425,7 @@ jerry_create_context (uint32_t heap_size,

**Example**

[doctest]: # (test="compile")
[doctest]: # (test="compile", name="02.API-REFERENCE-create-context.c")

```c
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion docs/11.EXT-REFERENCE-AUTORELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using the `__cleanup__` variable attribute. For other compilers, no support has

**Example**

[doctest]: # (test="compile")
[doctest]: # (test="compile", name="11.EXT-REFERENCE-AUTORELEASE.c")

```c
#include "jerryscript.h"
Expand Down
10 changes: 10 additions & 0 deletions tests/unit-doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ foreach(DOCTEST_ELEMENT IN LISTS DOCTEST_LIST)
endif()
endforeach()

# Disable 02.API-REFERENCE-create-context.c on Windows, because there is no pthread on it.
if("${PLATFORM}" STREQUAL "WINDOWS")
list(REMOVE_ITEM DOCTEST_COMPILE ${CMAKE_CURRENT_BINARY_DIR}/02.API-REFERENCE-create-context.c)
endif()

# Disable 11.EXT-REFERENCE-AUTORELEASE.c if compiler is MSVC, because MSVC doesn't support cleanup attribute.
if(USING_MSVC)
list(REMOVE_ITEM DOCTEST_COMPILE ${CMAKE_CURRENT_BINARY_DIR}/11.EXT-REFERENCE-AUTORELEASE.c)
endif()

# Add custom command to run doctest generator if any of the MarkDown sources
# changes.
add_custom_command(
Expand Down
5 changes: 5 additions & 0 deletions tests/unit-ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ set(INCLUDE_UNIT_EXT ${CMAKE_CURRENT_SOURCE_DIR})
# Unit tests main modules
file(GLOB SOURCE_UNIT_TEST_EXT_MODULES *.c)

# Disable test-ext-autorelease.c if compiler is MSVC, because MSVC doesn't support cleanup attribute.
if(USING_MSVC)
list(REMOVE_ITEM SOURCE_UNIT_TEST_EXT_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/test-ext-autorelease.c)
endif()

# Unit tests declaration
add_custom_target(unittests-ext)

Expand Down