Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve several ExpectedT<T> problems #511

Merged
merged 28 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
484b5fa
Simplify expected by deleting ErrorHolder since we never actually use…
BillyONeal Apr 16, 2022
d4036ef
Replace bespoke error-to-string functionality with fmt.
BillyONeal Apr 16, 2022
15af901
Allow not-default-constructible error types in expected.all_of
BillyONeal Apr 16, 2022
767c2b4
Merge remote-tracking branch 'origin/main' into cleanup-expected
BillyONeal Apr 19, 2022
9543cca
Guard calls to error() for the expected being in the error state.
BillyONeal Apr 19, 2022
144f523
Merge remote-tracking branch 'origin/main' into cleanup-expected
BillyONeal Apr 20, 2022
b5a5c33
Attempt to fix build errors on POSIX
BillyONeal Apr 21, 2022
f5489d1
Use v143 toolset for VS integration tests.
BillyONeal Apr 22, 2022
317dd2b
Provide end to end tests defaults.
BillyONeal Apr 22, 2022
bdc33e6
More expected misuse.
BillyONeal Apr 22, 2022
468de50
Fix missing value_is_error assignment.
BillyONeal Apr 22, 2022
7ef49eb
:'(
BillyONeal Apr 22, 2022
5a92c2a
Merge remote-tracking branch 'origin/main' into cleanup-expected
BillyONeal Apr 22, 2022
4328064
Localize ParseControlErrorInfo.
BillyONeal Apr 22, 2022
26ab178
Fix parameters not being forwarded by constructors, and add unit tests.
BillyONeal Apr 23, 2022
b4cdf4d
Fix unreferenced formal parameter warning.
BillyONeal Apr 24, 2022
4ed8458
Delete error_as_string.
BillyONeal Apr 24, 2022
58746f8
More tests and cleanup map family.
BillyONeal Apr 24, 2022
1d5fe22
Merge remote-tracking branch 'origin/main' into HEAD
BillyONeal May 24, 2022
d1ed66b
Fix fuzz tester build.
BillyONeal May 25, 2022
8c32de7
Merge commit 'd1ed66b14a150502e87b35c74f30f3965dc8f308' into cleanup-…
BillyONeal May 25, 2022
8d74faf
Use the to_string protocol rather than the format protocol to print e…
BillyONeal May 25, 2022
2963e03
Merge remote-tracking branch 'origin/main' into cleanup-expected
BillyONeal May 25, 2022
79b5b65
Revert no-longer-necessary test changes now that expected is move-ass…
BillyONeal May 25, 2022
b8fafa5
Rename S to Error and remove redundant !std::is_same_v<T, S> part of …
BillyONeal May 26, 2022
3ad031c
Update src/vcpkg-test/platform-expression.cpp
BillyONeal May 26, 2022
78b5fee
Update include/vcpkg/base/expected.h
BillyONeal May 26, 2022
de7fa7d
Make ExpectedHolder more paranoid about cvT
BillyONeal May 26, 2022
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
8 changes: 4 additions & 4 deletions azure-pipelines/e2e_ports/integrate-install/NoProps.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines/e2e_ports/integrate-install/Project1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
28 changes: 28 additions & 0 deletions azure-pipelines/end-to-end-tests-dir/fetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ if (-not $IsMacOS -and -not $IsLinux) {
<sha512>6004140d92e86afbb17b49c49037ccd0786ce238f340f7d0e62b4b0c29ed0d6ad0bab11feda2094ae849c387d70d63504393714ed0a1f4d3a1f155af7a4f1ba3</sha512>
<archiveName>ninja-win-1.10.2.zip</archiveName>
</tool>
<tool name="cmake" os="windows">
<version>3.22.2</version>
<exeRelativePath>cmake-3.22.2-windows-i386\bin\cmake.exe</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-windows-i386.zip</url>
<sha512>969d3d58d56d8fa3cc3acae2b949bf58abab945f70ae292ff20c9060d845dfc094c613c367a924abff47f307cc33af1467cdb9b75bb857868e38b2c7cdc72f79</sha512>
<archiveName>cmake-3.22.2-windows-i386.zip</archiveName>
</tool>
<tool name="cmake" os="osx">
<version>3.22.2</version>
<exeRelativePath>cmake-3.22.2-macos-universal/CMake.app/Contents/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-macos-universal.tar.gz</url>
<sha512>08104f608ecb9a5cfef38e79f0957d21e425616c0677781445492f82cbfec805113e3b5eb4bc737b707bb26a00678e7bd55e17555a5611c08b0b9b44ac5136ac</sha512>
<archiveName>cmake-3.22.2-macos-universal.tar.gz</archiveName>
</tool>
<tool name="cmake" os="linux">
<version>3.22.2</version>
<exeRelativePath>cmake-3.22.2-linux-x86_64/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-linux-x86_64.tar.gz</url>
<sha512>579e08b086f6903ef063697fca1dc2692f68a7341dd35998990b772b4221cdb5b1deecfa73bad9d46817ef09e58882b2adff9d64f959c01002c11448a878746b</sha512>
<archiveName>cmake-3.22.2linux-x86_64.tar.gz</archiveName>
</tool>
<tool name="cmake" os="freebsd">
<version>3.20.4</version>
<exeRelativePath>usr/local/bin/cmake</exeRelativePath>
<url>https://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/All/cmake-3.20.4.txz</url>
<sha512>3e5b675d7ff924f92996d912e2365582e687375109ef99c9073fb8196bb329243a406b218cf1358d7cc518988b311ce9e5bf87de4d64f2e6377b7c2bc8894475</sha512>
<archiveName>cmake-3.20.4.txz</archiveName>
</tool>
</tools>
"@ | % { $_ -replace "`r","" } | Out-File -enc ascii $(Join-Path $Scripts "vcpkgTools.xml")

Expand Down
16 changes: 9 additions & 7 deletions azure-pipelines/end-to-end-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ The location used as scratch space for testing.

[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Triplet,
[Parameter(Mandatory = $true)]
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[string]$WorkingRoot,
[string]$WorkingRoot = 'work',
[Parameter(Mandatory = $false)]
[string]$VcpkgRoot,
[Parameter(Mandatory = $false)]
Expand All @@ -36,10 +33,15 @@ Param(

$ErrorActionPreference = "Stop"

if (-Not (Test-Path $WorkingRoot)) {
New-Item -Path $WorkingRoot -ItemType Directory
if ($IsLinux) {
$Triplet = 'x64-linux'
} elseif ($IsMacOS) {
$Triplet = 'x64-osx'
} else {
$Triplet = 'x86-windows'
}

New-Item -Path $WorkingRoot -ItemType Directory -Force
$WorkingRoot = (Get-Item $WorkingRoot).FullName
if ([string]::IsNullOrWhitespace($VcpkgRoot)) {
$VcpkgRoot = $env:VCPKG_ROOT
Expand Down
3 changes: 0 additions & 3 deletions azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
displayName: 'Run vcpkg end-to-end tests'
inputs:
filePath: 'azure-pipelines/end-to-end-tests.ps1'
arguments: '-Triplet x64-linux -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
pwsh: true
- bash: |
Expand Down Expand Up @@ -100,7 +99,6 @@ jobs:
displayName: 'Run vcpkg end-to-end tests'
inputs:
filePath: 'azure-pipelines/end-to-end-tests.ps1'
arguments: '-Triplet x64-osx -WorkingRoot work -VcpkgRoot $(VCPKG_ROOT)'
workingDirectory: '$(Build.SourcesDirectory)/build.amd64.debug'
pwsh: true
- job: windows
Expand Down Expand Up @@ -140,7 +138,6 @@ jobs:
displayName: 'Run vcpkg end-to-end tests'
inputs:
filePath: 'azure-pipelines/end-to-end-tests.ps1'
arguments: '-Triplet x86-windows -WorkingRoot work'
workingDirectory: '$(Build.SourcesDirectory)/build.x86.debug'
pwsh: true
- task: Powershell@2
Expand Down
Loading