Skip to content

Commit 2c5c1b4

Browse files
committed
fix: String lower/lift now working for latin1+utf16
chore: Added additional string tests Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent 2d0efda commit 2c5c1b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2709
-2968
lines changed

.github/workflows/ubuntu.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,20 @@ jobs:
2626

2727
- uses: actions/cache@v3
2828
with:
29-
path: "**/cpm_modules"
30-
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
29+
path: "build/vcpkg_installed/**/*"
30+
key: ${{ github.workflow }}-vcpkg_installed }}
3131

3232
- name: install dependencies
3333
run: |
3434
sudo apt-get install ninja-build
3535
3636
- name: configure
3737
run: |
38-
cmake -G Ninja -S . -B build -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
39-
40-
- name: build-wasm
41-
run: ./test/wasm/build.sh
38+
cmake --preset linux-ninja-Debug
4239
4340
- name: build
44-
run: cmake --build build --parallel
41+
run: |
42+
cmake --build --preset linux-ninja-Debug
4543
4644
- name: test
4745
run: |

.github/workflows/windows.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ jobs:
2525

2626
- uses: actions/cache@v3
2727
with:
28-
path: "**/cpm_modules"
29-
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
28+
path: "build/vcpkg_installed/**/*"
29+
key: ${{ github.workflow }}-vcpkg_installed }}
3030

3131
- name: configure
3232
run: |
33-
cmake -S . -B build
33+
cmake --preset vcpkg-VS-17
3434
3535
- name: build
36-
run: cmake --build build --config Debug --parallel
36+
run: |
37+
cmake --build --preset VS-17-Debug
3738
3839
- name: test
3940
working-directory: build/test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/build*
2-
/.vscode
2+
/.vscode/settings.json
33
/cpm_modules
44
/vcpkg_installed
5+
/test/wasm/build*
56
.DS_Store

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
url = https://github.com/microsoft/vcpkg.git
44
[submodule "ref/component-model"]
55
path = ref/component-model
6-
url = git@github.com:WebAssembly/component-model.git
6+
url = https://github.com/WebAssembly/component-model.git
7+
[submodule "ref/vscode-wasm"]
8+
path = ref/vscode-wasm
9+
url = git@github.com:microsoft/vscode-wasm.git

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "(gdb) component-model-tests",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/build/test/component-model-test",
9+
"args": [],
10+
"stopAtEntry": false,
11+
"cwd": "${workspaceFolder}",
12+
"environment": [],
13+
"externalConsole": false,
14+
"preLaunchTask": "CMake: build"
15+
},
16+
{
17+
"name": "(win) component-model-tests",
18+
"type": "cppvsdbg",
19+
"request": "launch",
20+
"program": "${workspaceFolder}/build/test/Debug/component-model-test.exe",
21+
"args": [],
22+
"console": "integratedTerminal",
23+
"stopAtEntry": false,
24+
"cwd": "${workspaceFolder}",
25+
"environment": [],
26+
"preLaunchTask": "CMake: build"
27+
}
28+
]
29+
}

.vscode/tasks.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "CMake: build",
6+
"type": "shell",
7+
"command": "cmake",
8+
"args": [
9+
"--build",
10+
"${workspaceFolder}/build",
11+
"--parallel"
12+
],
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
},
17+
"problemMatcher": "$msCompile"
18+
}
19+
]
20+
}

CMakeLists.txt

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
cmake_minimum_required(VERSION 3.14...3.22)
22

3-
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
4-
set(VCPKG_FILES_DIR "${CMAKE_BINARY_DIR}" CACHE STRING "Folder for vcpkg download, build and installed files")
5-
set(CMAKE_TOOLCHAIN_FILE ${ROOT_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake)
6-
set(VCPKG_ROOT ${ROOT_DIR}/vcpkg)
7-
set(VCPKG_INSTALLED_DIR "${VCPKG_FILES_DIR}/vcpkg_installed")
8-
set(VCPKG_INSTALL_OPTIONS "--x-abi-tools-use-exact-versions;--downloads-root=${VCPKG_FILES_DIR}/vcpkg_downloads;--x-buildtrees-root=${VCPKG_FILES_DIR}/vcpkg_buildtrees;--x-packages-root=${VCPKG_FILES_DIR}/vcpkg_packages")
9-
set(VCPKG_VERBOSE OFF)
10-
11-
project(BuildAll LANGUAGES CXX)
12-
13-
# ---- Include guards ----
3+
project(component-model LANGUAGES CXX)
144

155
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
16-
message(
17-
FATAL_ERROR
18-
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there."
19-
)
6+
message(FATAL_ERROR
7+
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there."
8+
)
209
endif()
2110

11+
set(CMAKE_CXX_STANDARD 20)
12+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
13+
2214
add_subdirectory(src)
2315
add_subdirectory(test)
16+
17+
enable_testing()

CMakePresets.json

Lines changed: 63 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -15,85 +15,58 @@
1515
"toolchainFile": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
1616
"binaryDir": "${sourceDir}/build",
1717
"installDir": "${sourceDir}/build/stage",
18-
"cacheVariables": {},
19-
"hidden": true
20-
},
21-
{
22-
"name": "ninja",
23-
"generator": "Ninja",
18+
"cacheVariables": {
19+
"VCPKG_INSTALLED_DIR": "${sourceDir}/build/vcpkg_installed",
20+
"VCPKG_INSTALL_OPTIONS": "--x-abi-tools-use-exact-versions;--downloads-root=${sourceDir}/build/vcpkg_downloads;--x-buildtrees-root=${sourceDir}/build/vcpkg_buildtrees;--x-packages-root=${sourceDir}/build/vcpkg_packages"
21+
},
2422
"hidden": true
2523
},
2624
{
27-
"name": "debug",
25+
"name": "Debug",
26+
"installDir": "${sourceDir}/build/stage/Debug",
2827
"cacheVariables": {
2928
"CMAKE_BUILD_TYPE": "Debug"
3029
},
3130
"hidden": true
3231
},
3332
{
34-
"name": "release",
35-
"binaryDir": "${sourceDir}/build/Release",
36-
"installDir": "${sourceDir}/build/Release/stage",
33+
"name": "Release",
34+
"installDir": "${sourceDir}/build/stage/Release",
3735
"cacheVariables": {
3836
"CMAKE_BUILD_TYPE": "Release"
3937
},
4038
"hidden": true
4139
},
4240
{
43-
"name": "relwithdebinfo",
44-
"binaryDir": "${sourceDir}/build/RelWithDebInfo",
45-
"installDir": "${sourceDir}/build/RelWithDebInfo/stage",
41+
"name": "RelWithDebInfo",
42+
"installDir": "${sourceDir}/build/stage/RelWithDebInfo",
4643
"cacheVariables": {
4744
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
4845
},
4946
"hidden": true
5047
},
5148
{
52-
"name": "ubuntu",
53-
"cacheVariables": {},
49+
"name": "MinSizeRel",
50+
"installDir": "${sourceDir}/build/stage/MinSizeRel",
51+
"cacheVariables": {
52+
"CMAKE_BUILD_TYPE": "MinSizeRel"
53+
},
5454
"hidden": true
5555
},
5656
{
57-
"name": "windows",
57+
"name": "linux",
5858
"cacheVariables": {},
5959
"hidden": true
6060
},
6161
{
62-
"name": "ubuntu-ninja",
63-
"inherits": [
64-
"vcpkg",
65-
"ninja",
66-
"ubuntu"
67-
]
68-
},
69-
{
70-
"name": "ubuntu-ninja-debug",
71-
"inherits": [
72-
"ubuntu-ninja",
73-
"debug"
74-
]
75-
},
76-
{
77-
"name": "ubuntu-ninja-debug-minimal",
78-
"inherits": [
79-
"ubuntu-ninja",
80-
"debug"
81-
],
82-
"cacheVariables": {}
83-
},
84-
{
85-
"name": "ubuntu-ninja-release",
86-
"inherits": [
87-
"ubuntu-ninja",
88-
"release"
89-
]
62+
"name": "windows",
63+
"cacheVariables": {},
64+
"hidden": true
9065
},
9166
{
92-
"name": "ubuntu-ninja-relwithdebinfo",
93-
"inherits": [
94-
"ubuntu-ninja",
95-
"relwithdebinfo"
96-
]
67+
"name": "ninja",
68+
"generator": "Ninja",
69+
"hidden": true
9770
},
9871
{
9972
"name": "VS-16",
@@ -118,42 +91,62 @@
11891
"hidden": true
11992
},
12093
{
121-
"name": "vcpkg-VS-16",
94+
"name": "linux-ninja-Debug",
95+
"inherits": [
96+
"linux",
97+
"ninja",
98+
"vcpkg",
99+
"Debug"
100+
]
101+
},
102+
{
103+
"name": "linux-ninja-Release",
104+
"inherits": [
105+
"linux",
106+
"ninja",
107+
"vcpkg",
108+
"Release"
109+
]
110+
},
111+
{
112+
"name": "linux-ninja-RelWithDebInfo",
122113
"inherits": [
114+
"linux",
115+
"ninja",
123116
"vcpkg",
117+
"RelWithDebInfo"
118+
]
119+
},
120+
{
121+
"name": "linux-ninja-MinSizeRel",
122+
"inherits": [
123+
"linux",
124+
"ninja",
125+
"vcpkg",
126+
"MinSizeRel"
127+
]
128+
},
129+
{
130+
"name": "vcpkg-VS-16",
131+
"inherits": [
124132
"windows",
133+
"vcpkg",
125134
"VS-16"
126135
]
127136
},
128137
{
129138
"name": "vcpkg-VS-17",
130139
"inherits": [
131-
"vcpkg",
132140
"windows",
141+
"vcpkg",
133142
"VS-17"
134143
]
135144
}
136145
],
137146
"buildPresets": [
138147
{
139-
"name": "ninja-linux",
140-
"condition": {
141-
"type": "equals",
142-
"lhs": "${hostSystemName}",
143-
"rhs": "Linux"
144-
},
145-
"hidden": true,
146-
"nativeToolOptions": []
147-
},
148-
{
149-
"name": "Ninja-Linux-Debug",
150-
"inherits": "Ninja-Linux",
151-
"configuration": "Debug"
152-
},
153-
{
154-
"name": "Ninja-Linux-Release",
155-
"inherits": "Ninja-Linux",
156-
"configuration": "Release"
148+
"name": "linux-ninja-Debug",
149+
"configurePreset": "linux-ninja-Debug"
157150
},
158151
{
159152
"name": "VS-16-Debug",
@@ -201,11 +194,5 @@
201194
]
202195
}
203196
],
204-
"testPresets": [
205-
{
206-
"name": "xxx",
207-
"description": "",
208-
"displayName": ""
209-
}
210-
]
197+
"testPresets": []
211198
}

0 commit comments

Comments
 (0)